-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
82 lines (80 loc) · 2.07 KB
/
Copy pathdocker-compose.yml
File metadata and controls
82 lines (80 loc) · 2.07 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
82
version: "3.4"
services:
db:
container_name: tracking_db
image: postgres
volumes:
- ./backend-django/data/db:/var/lib/postgresql/data
env_file:
- ./backend-django/.env
restart: always
ports:
- "5432:5432"
environment:
- POSTGRES_DB=postgres
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
redis:
image: redis:alpine
container_name: tracking_redis
restart: always
ports:
- '6379:6379'
djangoq:
build: ./backend-django
container_name: tracking_djangoq
env_file:
- ./backend-django/.env
restart: always
command: python manage.py qcluster
volumes:
- ./backend-django/:/backend # maps host diretory to internal container directory
depends_on:
- redis
backend-django:
container_name: tracking_backend
build:
context: ./backend-django
dockerfile: ./Dockerfile
command: gunicorn config.wsgi:application --bind 0.0.0.0:8000
restart: always
volumes:
- ./backend-django/:/backend # maps host diretory to internal container directory
ports:
- "8000:8000"
# expose:
# - 8000
env_file:
- ./backend-django/.env
depends_on:
- db
- redis
- djangoq
frontend-react:
container_name: frontend-react
build:
context: ./frontend-react
dockerfile: ./Dockerfile
volumes:
- frontend-react_build:/frontend/build
## ports:
## - 3000:3000
# stdin_open: true
# environment:
# - CHOKIDAR_USEPOLLING=true
# restart: always
# command: npm start
nginx:
image: nginx:stable-alpine
container_name: nginx-employee-tracking
ports:
- 80:80
volumes:
- ./nginx/nginx.conf:/etc/nginx/conf.d/default.conf:ro
- ./backend-django/:/backend
- frontend-react_build:/var/www/frontend
depends_on:
- backend-django
- frontend-react
volumes:
frontend-react_build: