2022-11-22 00:15:00 +00:00
|
|
|
version: "3.4"
|
|
|
|
|
2022-11-23 18:29:32 +00:00
|
|
|
# DO NOT USE THIS IN PRODUCTION - it is for development only due to insecure
|
|
|
|
# settings and the use of "runserver" versus "gunicorn".
|
2022-12-20 11:50:28 +00:00
|
|
|
# See https://docs.jointakahe.org/en/latest/installation/ for more
|
2022-11-23 18:29:32 +00:00
|
|
|
|
2022-11-22 00:15:00 +00:00
|
|
|
x-takahe-common:
|
|
|
|
&takahe-common
|
2022-11-23 20:06:17 +00:00
|
|
|
build:
|
|
|
|
context: ..
|
|
|
|
dockerfile: ./docker/Dockerfile
|
|
|
|
|
2022-11-22 00:15:00 +00:00
|
|
|
image: takahe:latest
|
|
|
|
environment:
|
2022-11-27 17:54:01 +00:00
|
|
|
TAKAHE_DATABASE_SERVER: "postgres://postgres:insecure_password@db/takahe"
|
|
|
|
TAKAHE_DEBUG: "true"
|
2022-11-26 17:04:04 +00:00
|
|
|
TAKAHE_SECRET_KEY: "insecure_secret"
|
|
|
|
TAKAHE_CSRF_TRUSTED_ORIGINS: '["http://127.0.0.1:8000", "https://127.0.0.1:8000"]'
|
2022-11-27 17:54:01 +00:00
|
|
|
TAKAHE_USE_PROXY_HEADERS: "true"
|
2022-11-26 17:04:04 +00:00
|
|
|
TAKAHE_EMAIL_BACKEND: "console://console"
|
|
|
|
TAKAHE_MAIN_DOMAIN: "example.com"
|
|
|
|
TAKAHE_ENVIRONMENT: "development"
|
2022-12-26 17:42:02 +00:00
|
|
|
GUNICORN_EXTRA_CMD_ARGS: "--reload"
|
2022-11-22 00:15:00 +00:00
|
|
|
networks:
|
|
|
|
- external_network
|
|
|
|
- internal_network
|
|
|
|
restart: on-failure
|
|
|
|
depends_on:
|
|
|
|
- db
|
|
|
|
volumes:
|
|
|
|
- ..:/takahe/
|
2022-11-09 04:05:51 +00:00
|
|
|
|
|
|
|
services:
|
|
|
|
db:
|
2022-11-27 17:54:01 +00:00
|
|
|
image: docker.io/postgres:15-alpine
|
2022-11-09 04:05:51 +00:00
|
|
|
healthcheck:
|
|
|
|
test: ['CMD', 'pg_isready', '-U', 'postgres']
|
|
|
|
volumes:
|
|
|
|
- dbdata:/var/lib/postgresql/data
|
|
|
|
networks:
|
|
|
|
- internal_network
|
|
|
|
restart: always
|
|
|
|
environment:
|
2022-11-22 00:15:00 +00:00
|
|
|
POSTGRES_DB: takahe
|
|
|
|
POSTGRES_USER: postgres
|
|
|
|
POSTGRES_PASSWORD: insecure_password
|
2022-12-26 17:42:02 +00:00
|
|
|
ports:
|
|
|
|
- "5433:5432"
|
2022-11-09 04:05:51 +00:00
|
|
|
|
|
|
|
web:
|
2022-11-22 00:15:00 +00:00
|
|
|
<<: *takahe-common
|
2022-12-27 18:39:18 +00:00
|
|
|
healthcheck:
|
|
|
|
test: ["CMD", "nc", "-z", "-v", "localhost", "8000"]
|
|
|
|
interval: 20s
|
|
|
|
timeout: 60s
|
|
|
|
start_period: 15s
|
2022-11-09 04:05:51 +00:00
|
|
|
ports:
|
|
|
|
- "8000:8000"
|
2022-11-22 00:15:00 +00:00
|
|
|
|
2022-11-27 17:54:01 +00:00
|
|
|
stator:
|
|
|
|
<<: *takahe-common
|
|
|
|
command: ["/takahe/manage.py", "runstator"]
|
|
|
|
|
2022-11-22 00:15:00 +00:00
|
|
|
setup:
|
|
|
|
<<: *takahe-common
|
2022-12-27 18:39:18 +00:00
|
|
|
restart: "no"
|
|
|
|
command: >
|
|
|
|
bash -c "/takahe/manage.py migrate && /takahe/manage.py collectstatic --noinput"
|
2022-11-09 04:05:51 +00:00
|
|
|
|
|
|
|
networks:
|
|
|
|
internal_network:
|
|
|
|
external_network:
|
|
|
|
|
|
|
|
volumes:
|
|
|
|
dbdata:
|