-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcompose.yml
70 lines (67 loc) · 1.66 KB
/
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
services:
django:
hostname: django
container_name: django
build:
context: ./backend
dockerfile: Dockerfile
ports:
- 8000:8000
volumes:
- ./backend:/code
environment:
- AUTHENTICATION=${AUTHENTICATION}
- DEBUG=${DEBUG}
- DB_HOST=${DB_HOST}
- DB_NAME=${DB_NAME}
- DB_USER=${DB_USER}
- DB_PASS=${DB_PASS}
- ENVIRONMENT=${ENVIRONMENT}
- CREDENTIALS=${CREDENTIALS}
- EMAIL_ADDRESS=${EMAIL_ADDRESS}
- EMAIL_PASSWORD=${EMAIL_PASSWORD}
- IGNORE_SCHEDULER=${IGNORE_SCHEDULER}
- MAPS_API_KEY=${MAPS_API_KEY}
depends_on:
db:
condition: service_healthy
networks:
- backend
command: sh -c "python manage.py migrate && python manage.py createadmin && python manage.py runserver 0.0.0.0:8000"
nodejs:
hostname: nodejs
container_name: nodejs
build:
context: ./frontend
dockerfile: Dockerfile
ports:
- 3000:3000
environment:
- CHOKIDAR_USEPOLLING=true
volumes:
- ./frontend:/app
depends_on:
db:
condition: service_healthy
networks:
- backend
command: sh -c "npm install -g --unsafe-perm=true --allow-root && npm run start"
db:
image: postgres:latest
ports:
- 5432:5432
environment:
- POSTGRES_DB=${POSTGRES_DB}
- POSTGRES_USER=${POSTGRES_USER}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
networks:
- backend
healthcheck:
test: [ "CMD-SHELL", "pg_isready -d $${POSTGRES_DB} -U $${POSTGRES_USER}" ]
interval: 5s
timeout: 10s
retries: 5
networks:
backend:
name: colgate_network
driver: bridge