-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
49 lines (46 loc) · 1.19 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
name: ct-django
services:
app:
build: .
image: "rrchnm/ct-django"
ports:
- "8000:8000"
environment:
- DEBUG=True
- DJANGO_SECRET_KEY=thisisnotasecretkey
- DJANGO_ALLOWED_HOSTS=localhost
- DJANGO_CSRF_TRUSTED_ORIGINS=http://localhost
- DB_HOST=db
- DB_PORT=5432
- DB_NAME=connthreads
- DB_USER=connthreads
- DB_PASS=password
- OBJ_STORAGE=True
- OBJ_STORAGE_ACCESS_KEY_ID=connthreads-dev-key
- OBJ_STORAGE_SECRET_ACCESS_KEY=connthreads-secret-key
- OBJ_STORAGE_BUCKET_NAME=connthreads-dev
- OBJ_STORAGE_ENDPOINT_URL=https://obj.rrchnm.org
command: >
sh -c "
poetry run python manage.py migrate &&
poetry run python manage.py runserver 0.0.0.0:8000
"
volumes:
- dj-data:/app/media
db:
image: postgres:16
volumes:
- pg-data:/var/lib/postgresql/data
environment:
- POSTGRES_DB=connthreads
- POSTGRES_USER=connthreads
- POSTGRES_PASSWORD=password
- POSTGRES_HOST=db
healthcheck:
test: ["CMD-SHELL", "pg_isready -U connthreads"]
interval: 2s
timeout: 5s
retries: 3
volumes:
dj-data:
pg-data: