57 lines
No EOL
1.8 KiB
YAML
57 lines
No EOL
1.8 KiB
YAML
---
|
|
services:
|
|
asciinema:
|
|
image: ghcr.io/asciinema/asciinema-server:${ASCIICINEMA_VERSION:-latest}
|
|
container_name: asciicinema
|
|
networks:
|
|
- traefik
|
|
- asciicinema
|
|
environment:
|
|
- SECRET_KEY_BASE=${ASCIICINEMA_SECRET:?error}
|
|
- URL_HOST=${ASCIICINEMA_DOMAIN:?error}
|
|
- URL_SCHEME=https
|
|
- SMTP_HOST=${ASCIICINEMA_SMTP_HOST:-localhost}
|
|
- SMTP_USERNAME=${ASCIICINEMA_SMTP_USER:-none}
|
|
- SMTP_PASSWORD=${ASCIICINEMA_SMTP_PASSWORD:-none}
|
|
volumes:
|
|
- data:/var/opt/asciinema
|
|
labels:
|
|
- "traefik.enable=true"
|
|
- "traefik.docker.network=traefik"
|
|
- "traefik.http.routers.aciicinema.entrypoints=http"
|
|
- "traefik.http.routers.aciicinema.rule=Host(`${ASCIICINEMA_DOMAIN:?error}`)"
|
|
- "traefik.http.middlewares.aciicinema-https-redirect.redirectscheme.scheme=https"
|
|
- "traefik.http.routers.aciicinema.middlewares=aciicinema-https-redirect"
|
|
- "traefik.http.routers.aciicinema-secure.entrypoints=https"
|
|
- "traefik.http.routers.aciicinema-secure.rule=Host(`${ASCIICINEMA_DOMAIN:?error}`)"
|
|
- "traefik.http.routers.aciicinema-secure.tls=true"
|
|
- "traefik.http.routers.aciicinema-secure.service=aciicinema"
|
|
- "traefik.http.services.aciicinema.loadbalancer.server.port=4000"
|
|
depends_on:
|
|
postgres:
|
|
condition: service_healthy
|
|
|
|
postgres:
|
|
image: docker.io/library/postgres:${ASCIICINEMA_POSTGRESQL_VERSION:-16}
|
|
container_name: asciicinema-db
|
|
networks:
|
|
- asciicinema
|
|
environment:
|
|
- POSTGRES_HOST_AUTH_METHOD=trust
|
|
volumes:
|
|
- db:/var/lib/postgresql/data
|
|
healthcheck:
|
|
test: ['CMD-SHELL', 'pg_isready -U postgres']
|
|
interval: 2s
|
|
timeout: 5s
|
|
retries: 10
|
|
|
|
networks:
|
|
traefik:
|
|
external: true
|
|
asciicinema:
|
|
driver: bridge
|
|
|
|
volumes:
|
|
data:
|
|
db: |