Skip to content

Acsiinema

YAML
services:
  asciinema:
    image: ghcr.io/asciinema/asciinema-server:20231217
    environment:
      - SECRET_KEY_BASE=Lmv8PTmRfuICr1kNZY0VGWzKHUk0OoTje9gY2rlD6PBqGq0sg0XDM4x2dmFxT2NH  # tr -dc A-Za-z0-9 </dev/urandom | head -c 64; echo
      - URL_HOST=asciinema.durbok.xyz # added int /etc/hosts
      - URL_SCHEME=http
      - SMTP_HOST=smtp.server.com
      - SMTP_USERNAME=user
      - SMTP_PASSWORD=password
      - SMTP_PORT=2525
      - [email protected]
      - SMTP_TLS=never
    volumes:
      - ./asciinema_data:/var/opt/asciinema
    depends_on:
      postgres:
        condition: service_healthy

  postgres:
    image: docker.io/library/postgres:14
    environment:
      - POSTGRES_HOST_AUTH_METHOD=trust
    volumes:
      - ./postgres_data:/var/lib/postgresql/data
    healthcheck:
      test: ['CMD-SHELL', 'pg_isready -U postgres']
      interval: 2s
      timeout: 5s
      retries: 10

  caddy:
    image: caddy:2
    command: caddy reverse-proxy --from http://asciinema.durbok.xyz --to http://asciinema:4000
    ports:
      - '80:80'
#      - '443:443'
#      - '443:443/udp'
    volumes:
      - ./caddy_data:/data
      - ./caddy_config:/config

Check the docs