-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.prod.yml
66 lines (59 loc) · 1.21 KB
/
docker-compose.prod.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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
# 웹 개발용, development version, backend, frontend db만 있음.
# docker-compose -f docker-compose.dev.yml up 으로 실행가능
version: "3"
services:
db:
image: postgres:12.0-alpine
env_file:
- ./backend/.env
volumes:
- postgres_data:/var/lib/postgresql/data
ports:
- 5432:5432
restart: always
pgadmin:
image: dpage/pgadmin4
env_file:
- ./backend/.env
ports:
- 5050:80
backend:
build:
context: ./backend
dockerfile: Dockerfile
ports:
- 8080:8080
volumes:
- ./backend/:/app
working_dir: /app
command: sh run.sh
expose:
- 8080
env_file:
- ./backend/.env
depends_on:
- db
frontend:
build:
context: ./frontend
args:
API_URL: "*"
volumes:
- ./frontend/:/frontend
- build_folder:/frontend/build
- ./frontend/node_modules/:/frontend/node_modules
tty: true
# nginx 컨테이너(서버)
nginx:
build: ./nginx
ports:
- 80:80
volumes:
- build_folder:/var/www/frontend
depends_on:
- backend
- frontend
# 컨테이너 내려도 데이터 유지되도록 함
volumes:
postgres_data:
build_folder: