-
Notifications
You must be signed in to change notification settings - Fork 2
/
docker-compose.dev.yml
43 lines (41 loc) · 1.14 KB
/
docker-compose.dev.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
version: "3.9"
services:
database:
hostname: database
container_name: database
image: mongo
ports: [27017:27017]
command: mongod --quiet --logpath /dev/null
backend:
container_name: discord_backend
depends_on: [database]
image: discord_backend
build:
context: .
dockerfile: ./backend/.docker/Dockerfile.dev
environment:
- PORT=4000
- MONGO_URI=mongodb://database:27017/discord-clone
volumes:
- ./backend:/app/backend
- ./backend/node_modules:/app/backend/node_modules
- ./backend/keys:/app/backend/keys
- ./logs:/app/backend/logs
- ./types:/app/types
ports: [4000:4000, 4001:4001]
frontend:
container_name: discord_frontend
depends_on: [database]
image: discord_frontend
build:
context: .
dockerfile: ./frontend/.docker/Dockerfile.dev
environment:
- VITE_API_ROOT=http://localhost:4000
- VITE_WS_ROOT=http://localhost:4001
- VITE_API_VERSION=1
volumes:
- ./frontend:/app/frontend
- ./frontend/node_modules:/app/frontend/node_modules
- ./types:/app/types
ports: [3000:3000, 3001:3001]