-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
45 lines (38 loc) · 1009 Bytes
/
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
version: '3'
services:
app:
build: .
environment:
DEBUG: 1 # 1=true, 0=false
ALLOWED_HOSTS: "127.0.0.1" # split by ',' do not use spaces. eg: "127.0.0.1,192.168.0.1,192.168.0.2"
SECRET_KEY: verysecurekey
SUPERUSER_USERNAME: admin
SUPERUSER_EMAIL: [email protected]
SUPERUSER_PASSWORD: admin
DB_ENGINE: django.db.backends.postgresql_psycopg2 # or postgresql
DB_NAME: mydatabase
DB_USER: mydatabaseuser
DB_PASS: mypassword
DB_HOST: db # same name as the postgres service
DB_PORT: 5432
ports:
- 8008:8000
links:
- db
depends_on:
db:
condition: service_healthy
db:
image: postgres
restart: unless-stopped
environment:
POSTGRES_DB: mydatabase
POSTGRES_USER: mydatabaseuser
POSTGRES_PASSWORD: mypassword
ports:
- 5432:5432
healthcheck:
test: [ "CMD-SHELL", "pg_isready -U postgres" ]
interval: 5s
timeout: 5s
retries: 5