2023-11-24 16:17:39 +01:00
|
|
|
version: '2.2'
|
|
|
|
|
|
|
|
x-takahe-common: &takahe-common
|
|
|
|
image: jointakahe/takahe:latest
|
|
|
|
restart: on-failure
|
|
|
|
environment: &takahe-common-environment
|
|
|
|
TAKAHE_DATABASE_SERVER: "postgres://takahe:takahe@takahe-db/takahe"
|
|
|
|
TAKAHE_MEDIA_BACKEND: "local://"
|
|
|
|
TAKAHE_MEDIA_ROOT: "/media"
|
2023-11-25 00:41:02 +01:00
|
|
|
TAKAHE_MEDIA_URL: "https://takahemedia.ixvd.net/"
|
2023-11-24 16:17:39 +01:00
|
|
|
TAKAHE_MAIN_DOMAIN: "takahe.ixvd.net"
|
|
|
|
env_file:
|
|
|
|
- /etc/ixvd/secrets/env/takahe.env
|
|
|
|
volumes:
|
|
|
|
- /srv/takahe/data:/media
|
|
|
|
networks: &takahe-common-networks
|
|
|
|
- takahe
|
|
|
|
|
|
|
|
services:
|
|
|
|
takahe:
|
|
|
|
<<: *takahe-common
|
|
|
|
healthcheck:
|
|
|
|
test: ["CMD", "nc", "-z", "-v", "localhost", "8000"]
|
|
|
|
interval: 20s
|
|
|
|
timeout: 60s
|
|
|
|
start_period: 15s
|
|
|
|
depends_on:
|
2023-11-25 00:02:26 +01:00
|
|
|
takahe-setup:
|
2023-11-24 16:17:39 +01:00
|
|
|
condition: service_completed_successfully
|
|
|
|
networks:
|
|
|
|
- takahe
|
|
|
|
- proxy
|
|
|
|
|
|
|
|
takahe-stator:
|
|
|
|
<<: *takahe-common
|
|
|
|
command: ["/takahe/manage.py", "runstator"]
|
|
|
|
depends_on:
|
2023-11-25 00:02:53 +01:00
|
|
|
takahe-setup:
|
2023-11-24 16:17:39 +01:00
|
|
|
condition: service_completed_successfully
|
|
|
|
|
|
|
|
takahe-setup:
|
|
|
|
<<: *takahe-common
|
|
|
|
restart: "no"
|
|
|
|
command: >
|
|
|
|
bash -c "/takahe/manage.py migrate && /takahe/manage.py collectstatic --noinput"
|
|
|
|
|
|
|
|
takahe-db:
|
|
|
|
image: docker.io/postgres:15-alpine
|
|
|
|
healthcheck:
|
|
|
|
test: ['CMD', 'pg_isready', '-U', 'postgres']
|
|
|
|
volumes:
|
|
|
|
- /srv/takahe/other/db:/var/lib/postgresql/data
|
|
|
|
restart: always
|
|
|
|
environment:
|
|
|
|
POSTGRES_DB: takahe
|
|
|
|
POSTGRES_USER: takahe
|
|
|
|
POSTGRES_PASSWORD: takahe
|
|
|
|
networks:
|
|
|
|
- takahe
|
|
|
|
|
|
|
|
networks:
|
|
|
|
takahe:
|