Files
Link-Log/docker-compose-example.yml
T
Olaf bd78e3b86e
Build LinkLog Development Image / development-image (push) Successful in 9s
Added a docker compose example
2026-08-25 22:22:31 +02:00

41 lines
2.0 KiB
YAML

# Use with an appropriate .env file
services:
app:
image: git.kolkman.org/olaf/link-log:development # or :latest or a version-tag
container_name: ${APP_CONTAINER_NAME:-linklog-app}
ports:
- "${APP_PORT:-8000}:8000"
volumes:
- ./linklog_data:/app/backend/data
environment:
APP_ENV: ${APP_ENV:-production}
LINKLOG_APP_NAME: ${LINKLOG_APP_NAME:-LinkLog}
LINKLOG_DATABASE_PATH: ${LINKLOG_DATABASE_PATH:-/app/backend/data/linklog.db}
LINKLOG_SECRET_KEY: ${LINKLOG_SECRET_KEY:?Set LINKLOG_SECRET_KEY in .env}
LINKLOG_TOKEN_EXPIRY_DAYS: ${LINKLOG_TOKEN_EXPIRY_DAYS:-30}
LINKLOG_TRACKING_PARAMS: ${LINKLOG_TRACKING_PARAMS:-}
restart: ${APP_RESTART_POLICY:-unless-stopped}
healthcheck:
test: ["CMD", "python", "-c", "from urllib.request import urlopen; urlopen('http://127.0.0.1:8000/health', timeout=3)"]
interval: ${APP_HEALTHCHECK_INTERVAL:-30s}
timeout: ${APP_HEALTHCHECK_TIMEOUT:-5s}
start_period: ${APP_HEALTHCHECK_START_PERIOD:-10s}
retries: ${APP_HEALTHCHECK_RETRIES:-3}
labels:
traefik.enable: true
traefik.http.middlewares.web-https-redirect.redirectscheme.scheme: https
traefik.http.services.linklog.loadbalancer.server.port: 8000
traefik.docker.network: linklog_traefik # network to be shared with traefik
traefik.http.routers.linklog.entrypoints: web
traefik.http.routers.linklog.rule: Host(`linklog.example.com`) # Make sure to change
traefik.http.routers.linklog.middlewares: web-https-redirect,servicests # these middlewares must exist
traefik.http.routers.linklog-secure.entrypoints: websecure
traefik.http.routers.linklog-secure.rule: Host(`linklog.example.com`) #Make sure to change
traefik.http.routers.linklog-secure.tls: true
traefik.http.routers.linklog-secure.middlewares: servicests
traefik.http.routers.linklog-secure.tls.certresolver: myresolver # or your resovler, e.g certbot
traefik.http.routers.linklog-secure.service: linklog