Add ASCIICinema container
This commit is contained in:
parent
6e9ca2e345
commit
a1db8fc197
3 changed files with 72 additions and 0 deletions
12
asciicinema/.env-example
Normal file
12
asciicinema/.env-example
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
# Asciinema
|
||||||
|
ASCIICINEMA_VERSION=latest
|
||||||
|
ASCIICINEMA_SECRET= # tr -dc A-Za-z0-9 </dev/urandom | head -c 64; echo
|
||||||
|
ASCIICINEMA_DOMAIN=asciicinema.example.com
|
||||||
|
|
||||||
|
# SMTP
|
||||||
|
ASCIICINEMA_SMTP_HOST=localhost
|
||||||
|
ASCIICINEMA_SMTP_USER=none
|
||||||
|
ASCIICINEMA_SMTP_PASSWORD=none
|
||||||
|
|
||||||
|
# PostgreSQL
|
||||||
|
ASCIICINEMA_POSTGRESQL_VERSION=16
|
3
asciicinema/README.md
Normal file
3
asciicinema/README.md
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
After installastion you must install the asciicinema-client and point it to your location:
|
||||||
|
|
||||||
|
export ASCIINEMA_API_URL=https://asciinema.example.com
|
57
asciicinema/docker-compose.yml
Normal file
57
asciicinema/docker-compose.yml
Normal file
|
@ -0,0 +1,57 @@
|
||||||
|
---
|
||||||
|
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:
|
Loading…
Add table
Reference in a new issue