feat: takahe fedi

This commit is contained in:
Strix 2023-11-24 16:17:39 +01:00
parent 63665f2701
commit f98373ca7f
No known key found for this signature in database
GPG key ID: 5F35B3B8537287A7
2 changed files with 75 additions and 0 deletions

View file

@ -0,0 +1,13 @@
server {
listen 80;
server_name takahe.ixvd.net;
location / {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-Port 443;
proxy_pass http://takahe:8000;
}
}

View file

@ -0,0 +1,62 @@
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: