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" TAKAHE_MEDIA_URL: "/media/" 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: setup: condition: service_completed_successfully networks: - takahe - proxy takahe-stator: <<: *takahe-common command: ["/takahe/manage.py", "runstator"] depends_on: setup: 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: