-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker.compose.yaml
69 lines (68 loc) · 1.35 KB
/
docker.compose.yaml
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
version: '4'
services:
db:
container_name: db
image: postgres
restart: always
environment:
- POSTGRES_DATABASE=postgres
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
- POSTGRES_HOST_AUTH_METHOD=trust
ports:
- '5432:5432'
networks:
- bitway
backend:
container_name: backend
restart: always
build:
context: .
args:
- POSTGRES_HOST=db
- POSTGRES_PWD=postgres
dockerfile: Dockerfile.backend.dev
volumes:
- ./backend:/app/backend
- /app/backend/node_modules
ports:
- "8000:8000"
depends_on:
- db
networks:
- bitway
env_file:
- .env.development
frontend:
container_name: frontend
restart: always
build:
context: .
args:
- NEXT_PUBLIC_API_URL="http://backend:8000/api/"
dockerfile: Dockerfile.frontend.dev
volumes:
- ./frontend:/app/frontend
- /app/frontend/node_modules
ports:
- "3000:3000"
depends_on:
- backend
networks:
- bitway
env_file:
- ./frontend/.env.production
nginx:
image: nginx:latest
container_name: nginx
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf
ports:
- "80:80"
depends_on:
- backend
networks:
- bitway
networks:
bitway:
driver: bridge