-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
61 lines (58 loc) · 1.48 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
version: '3.9'
services:
frontend:
container_name: ${FRONTEND_NAME}
build:
context: .
dockerfile: ./.conf/development/frontend/Dockerfile
args:
ARG_PORT: ${FRONTEND_PORT}
ports:
- ${FRONTEND_PORT}:${FRONTEND_PORT}
volumes:
- ./frontend:/frontend
backend:
container_name: ${BACKEND_NAME}
build:
context: .
dockerfile: ./.conf/development/backend/Dockerfile
command: >
sh -c "python manage.py wait_for_db &&
python manage.py migrate &&
python manage.py runserver 0.0.0.0:8000"
environment:
SECRET_KEY: ${BACKEND_SECRET_KEY}
DEBUG: ${BACKEND_DEBUG}
ALLOWED_HOSTS: ${BACKEND_ALLOWED_HOSTS}
CSRF_TRUSTED_ORIGINS: ${CSRF_TRUSTED_ORIGINS}
DB_HOST: ${DB_HOST}
DB_PORT: ${DB_PORT}
DB_NAME: ${DB_NAME}
DB_USER: ${DB_USER}
DB_PASSWORD: ${DB_PASSWORD}
ports:
- ${BACKEND_PORT}:${BACKEND_PORT}
volumes:
- ./backend:/backend
depends_on:
- db
db:
image: postgres:${DB_POSTGRES_VERSION}
container_name: ${DB_HOST}
environment:
POSTGRES_DB: ${DB_NAME}
POSTGRES_USER: ${DB_USER}
POSTGRES_PASSWORD: ${DB_PASSWORD}
PGPORT: ${DB_PORT}
ports:
- ${DB_PORT}:${DB_PORT}
volumes:
- cathedral_db:/var/lib/postgresql/data
adminer:
container_name: ${DB_ADMINER_NAME}
image: adminer
ports:
- ${DB_ADMINER_PORT}:8080
volumes:
cathedral_db:
name: cathedral_db