-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
81 lines (73 loc) · 1.94 KB
/
docker-compose.yml
File metadata and controls
81 lines (73 loc) · 1.94 KB
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
version: "3.9"
services:
django:
build:
dockerfile: docker/django/Dockerfile
target: django_with_entrypoint
args:
- PYTHONDONTWRITEBYTECODE=${PYTHONDONTWRITEBYTECODE}
command: python manage.py runserver 0.0.0.0:8000
environment:
- POSTGRES_HOST=postgresql
- POSTGRES_USER=${POSTGRES_USER}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
- POSTGRES_DB=${POSTGRES_DB}
- POSTGRES_PORT=${POSTGRES_PORT}
- SECRET_KEY=${SECRET_KEY}
- DEBUG=${DEBUG}
- ALLOWED_HOSTS=${ALLOWED_HOSTS}
volumes:
- ./django:/code
ports:
- "${DJANGO_PORT}:8000"
depends_on:
- celery
postgresql:
image: public.ecr.aws/docker/library/postgres:15
volumes:
- postgres_data:/var/lib/postgresql/data/
environment:
- POSTGRES_USER=${POSTGRES_USER}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
- POSTGRES_DB=${POSTGRES_DB}
reactjs:
build:
dockerfile: ./docker/reactjs/Dockerfile
command: npm start
# command: serve -s build
volumes:
- ./reactjs:/code
- /code/node_modules
ports:
- "${REACTJS_PORT}:3000"
environment:
- CHOKIDAR_USEPOLLING=true
- NODE_ENV=${NODE_ENV}
- WATCHPACK_POLLING=true
depends_on:
- django
redis:
image: public.ecr.aws/docker/library/redis:7-alpine
celery:
build:
dockerfile: docker/django/Dockerfile
target: django
args:
- PYTHONDONTWRITEBYTECODE=${PYTHONDONTWRITEBYTECODE}
command: celery -A core worker -l info
environment:
- POSTGRES_HOST=postgresql
- POSTGRES_USER=${POSTGRES_USER}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
- POSTGRES_DB=${POSTGRES_DB}
- POSTGRES_PORT=${POSTGRES_PORT}
- SECRET_KEY=${SECRET_KEY}
- DEBUG=${DEBUG}
- ALLOWED_HOSTS=${ALLOWED_HOSTS}
volumes:
- ./django:/code
depends_on:
- redis
- postgresql
volumes:
postgres_data: