-
Notifications
You must be signed in to change notification settings - Fork 2
/
docker-compose.yml
90 lines (79 loc) · 1.69 KB
/
docker-compose.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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
version: "3"
services:
backend:
build:
context: ./backend
command: flask run --host=127.0.0.1 --port=5000
#env_file:
# - ./settings/.env
environment:
FLASK_APP: /myapp
networks:
- app-tier
volumes:
- ./backend/:/backend/
ports:
- 5000:5000
frontend:
build:
context: ./frontend
command: ["yarn", "start"]
networks:
- app-tier
volumes:
- ./frontend/:/frontend
- build_folder:/frontend/build
- ./frontend/node_modules/:/frontend/node_modules
ports:
- 80:3000
colorization-ai:
build:
context: ./colorization-AI
command: flask run --host=127.0.0.1 --port=5555
networks:
- app-tier
env_file:
- ./settings/.env
environment:
FLASK_APP: ./app.py
ports:
- 5555:5555
rabbit:
hostname: rabbit
image: rabbitmq:3-management
command: rabbitmq-server
restart: unless-stopped
# environment:
# - RABBITMQ_DEFAULT_USER=admin
# - RABBITMQ_DEFAULT_PASS=mypass
networks:
- app-tier
ports:
- 5672:5672
- 15672:15672
depends_on:
- backend
- colorization-ai
celery:
build:
context: ./backend
dockerfile: Dockerfile
restart: unless-stopped
env_file:
- ./settings/.env
depends_on:
- "rabbit"
- "backend"
- "colorization-ai"
networks:
- app-tier
command: ["celery","-A", "myapp.service.PhotoService", "worker", "--loglevel=info"]
volumes:
- ./backend:/usr/src/app
networks:
app-tier:
driver: bridge
# 컨테이너 내려도 데이터 유지되도록 함
volumes:
media_volume: null
build_folder: null