infrastructure/ansible/plays/services/gotosocial/docker-compose.yaml

70 lines
2.4 KiB
YAML
Raw Permalink Normal View History

2024-02-05 18:44:13 +01:00
{% import 'macro/postgres.j2' as pg with context %}
2024-01-15 20:42:58 +01:00
---
version: '3'
services:
gotosocial:
image: superseriousbusiness/gotosocial:latest
restart: unless-stopped
user: "1000:1000"
depends_on:
db:
condition: service_healthy
environment:
GTS_LOG_LEVEL: "info"
GTS_HOST: "social.unruhig.eu"
GTS_ACCOUNT_DOMAIN: "unruhig.eu"
GTS_DB_TYPE: "postgres"
GTS_DB_ADDRESS: "db"
GTS_DB_PORT: "5432"
GTS_DB_DATABASE: "{{ gotosocial.db.user }}"
GTS_DB_USER: "{{ gotosocial.db.user }}"
GTS_DB_PASSWORD: "{{ gotosocial.db.password }}"
GTS_TRUSTED_PROXIES: "127.0.0.1/32,10.254.0.0/17,fd64:2::/104,::1"
GTS_INSTANCE_LANGUAGES: "de,en-gb"
GTS_LETSENCRYPT_ENABLED: "false"
GTS_METRICS_ENABLED: "true"
2024-01-15 20:43:46 +01:00
GTS_LANDING_PAGE_USER: "admin"
2024-01-15 20:42:58 +01:00
# STORAGE
GTS_STORAGE_BACKEND: "s3"
GTS_STORAGE_S3_ENDPOINT: "{{ gotosocial.s3.endpoint }}"
GTS_STORAGE_S3_BUCKET: "{{ gotosocial.s3.bucket }}"
GTS_STORAGE_S3_ACCESS_KEY: "{{ gotosocial.s3.access_key }}"
GTS_STORAGE_S3_SECRET_KEY: "{{ gotosocial.s3.secret_key | mandatory }}"
# OPENID CONNECT
GTS_OIDC_ENABLED: "true"
GTS_OIDC_IDP_NAME: "KeyCloak"
GTS_OIDC_ISSUER: "{{ gotosocial.oidc.issuer }}"
GTS_OIDC_CLIENT_ID: "{{ gotosocial.oidc.client_id }}"
GTS_OIDC_CLIENT_SECRET: "{{ gotosocial.oidc.client_secret }}"
2024-01-16 01:27:32 +01:00
GTS_OIDC_ADMIN_GROUPS: "gotosocial-admin,service-admin"
2024-01-15 20:42:58 +01:00
GTS_OIDC_SCOPES: "openid,email,profile"
# GTS_ACCOUNTS_REGISTRATION_OPEN: "false"
TZ: "Europe/Berlin"
labels:
- "traefik.enable=true"
2024-01-22 18:56:17 +01:00
- "traefik.docker.network=${COMPOSE_PROJECT_NAME}_default"
2024-01-15 20:42:58 +01:00
- "traefik.http.routers.gotosocial.rule=(Host(`social.unruhig.eu`) || (Host(`unruhig.eu`) && Path(`/.well-known/{a:(webfinger|nodeinfo|host-meta)}`)))"
- "traefik.http.routers.gotosocial.entryPoints=websecure"
- "traefik.http.services.gotosocial.loadbalancer.server.port=8080"
- "traefik.http.routers.gotosocial.middlewares=deny-metrics@file"
- "prometheus-scrape.enabled=true"
- "prometheus-scrape.port=8080"
networks:
- backend
- default
- metrics
2024-02-05 18:44:13 +01:00
{{ pg.postgres("db", gotosocial.db.user, gotosocial.db.password, gotosocial.db.user, ["backend"]) }}
2024-01-15 20:42:58 +01:00
volumes:
2024-02-05 18:44:13 +01:00
db_data:
2024-01-15 20:42:58 +01:00
networks:
backend:
internal: true
metrics:
external: true
2024-02-05 18:44:13 +01:00
postgres:
internal: true
2024-01-15 20:42:58 +01:00
...