2022-11-21 16:15:00 -08:00
|
|
|
version: "3.4"
|
|
|
|
|
2022-11-23 10:29:32 -08:00
|
|
|
# DO NOT USE THIS IN PRODUCTION - it is for development only due to insecure
|
|
|
|
# settings and the use of "runserver" versus "gunicorn".
|
|
|
|
# See https://takahe-server.readthedocs.io/en/latest/installation.html for more
|
|
|
|
|
2022-11-21 16:15:00 -08:00
|
|
|
x-takahe-common:
|
|
|
|
&takahe-common
|
2022-11-23 12:06:17 -08:00
|
|
|
build:
|
|
|
|
context: ..
|
|
|
|
dockerfile: ./docker/Dockerfile
|
|
|
|
|
2022-11-21 16:15:00 -08:00
|
|
|
image: takahe:latest
|
|
|
|
environment:
|
2022-11-22 23:01:18 -08:00
|
|
|
DJANGO_SETTINGS_MODULE: takahe.settings.development
|
2022-11-21 16:15:00 -08:00
|
|
|
PGHOST: db
|
|
|
|
PGDATABASE: takahe
|
|
|
|
PGUSER: postgres
|
|
|
|
PGPASSWORD: insecure_password
|
|
|
|
networks:
|
|
|
|
- external_network
|
|
|
|
- internal_network
|
|
|
|
restart: on-failure
|
|
|
|
depends_on:
|
|
|
|
- db
|
|
|
|
volumes:
|
|
|
|
- ..:/takahe/
|
2022-11-08 20:05:51 -08:00
|
|
|
|
|
|
|
services:
|
|
|
|
db:
|
|
|
|
image: postgres:15-alpine
|
|
|
|
healthcheck:
|
|
|
|
test: ['CMD', 'pg_isready', '-U', 'postgres']
|
|
|
|
volumes:
|
|
|
|
- dbdata:/var/lib/postgresql/data
|
|
|
|
networks:
|
|
|
|
- internal_network
|
|
|
|
restart: always
|
|
|
|
environment:
|
2022-11-21 16:15:00 -08:00
|
|
|
POSTGRES_DB: takahe
|
|
|
|
POSTGRES_USER: postgres
|
|
|
|
POSTGRES_PASSWORD: insecure_password
|
2022-11-08 20:05:51 -08:00
|
|
|
|
|
|
|
web:
|
2022-11-21 16:15:00 -08:00
|
|
|
<<: *takahe-common
|
2022-11-08 20:05:51 -08:00
|
|
|
ports:
|
|
|
|
- "8000:8000"
|
2022-11-21 16:15:00 -08:00
|
|
|
|
|
|
|
setup:
|
|
|
|
<<: *takahe-common
|
|
|
|
command: ["/takahe/manage.py", "migrate"]
|
2022-11-08 20:05:51 -08:00
|
|
|
|
|
|
|
networks:
|
|
|
|
internal_network:
|
|
|
|
external_network:
|
|
|
|
|
|
|
|
volumes:
|
|
|
|
dbdata:
|