-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
43 lines (41 loc) · 946 Bytes
/
Copy pathdocker-compose.yml
File metadata and controls
43 lines (41 loc) · 946 Bytes
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
version: '3.3'
services:
app:
container_name: dtech-app
build:
context: .
dockerfile: docker/api/Dockerfile
restart: always
env_file:
- .env
environment:
- APP_HOST=0.0.0.0
- POSTGRES_HOST=postgres
- POSTGRES_PORT=5432
depends_on:
- postgres
ports:
- "${APP_PORT}:${APP_PORT}"
command:
/bin/bash -c """
python launcher.py init-database &&
python launcher.py create-superuser -n admin -p password &&
python launcher.py runserver
"""
postgres:
container_name: dtech-postgres
build:
context: .
dockerfile: docker/postgresql/Dockerfile
restart: always
env_file:
- .env
ports:
- "${POSTGRES_PORT}:5432"
environment:
- POSTGRES_USER=${POSTGRES_USER}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
- POSTGRES_DB=${POSTGRES_DATABASE_NAME}
networks:
default:
driver: bridge