forked from memoryInject/media-review-app
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
86 lines (79 loc) · 2.15 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
version: '3.8'
services:
nginx:
restart: always
build:
context: ./compose/local/nginx
dockerfile: Dockerfile
ports:
- '3050:80'
backend:
build:
context: .
dockerfile: ./compose/local/backend/Dockerfile
# '/start.sh' is the shell script used to run the service
command: /start.sh
# This volume is used to map the files and folders on the host to the container
# so if we change code on the host, code in the docker container will also changed
volumes:
- ./backend:/app
ports:
- 8000:8000
# env_file is used to manage the env variables of project
env_file:
- ./.env.development.local
depends_on:
- redis
- db
db:
image: postgres:14-alpine
volumes:
- postgres_data:/var/lib/postgresql/data/
environment:
- POSTGRES_DB=media_review_app_dev
- POSTGRES_USER=myuser
- POSTGRES_PASSWORD=mypass
redis:
image: redis:6-alpine
celery_worker:
build:
context: .
dockerfile: ./compose/local/backend/Dockerfile
command: /start-celery-worker.sh
volumes:
- ./backend:/app
env_file:
- ./.env.development.local
depends_on:
- redis
- db
celery_flower:
build:
context: .
dockerfile: ./compose/local/backend/Dockerfile
command: /start-celery-flower.sh
volumes:
- ./backend:/app
env_file:
- ./.env.development.local
ports:
- 4448:4444
depends_on:
- redis
- db
frontend:
build:
context: .
dockerfile: ./compose/local/frontend/Dockerfile
command: /start.sh
volumes:
- /app/node_modules
- ./frontend:/app
ports:
- 3000:3000
env_file:
- ./.env.development.local
depends_on:
- backend
volumes:
postgres_data: