lthn.io/docker-compose.yml
Claude faa0d89e8d
fix: SQLite database path in container + create on build
Container was using host path for SQLite. Now creates database.sqlite
during Docker build and sets DB_DATABASE=/app/database/database.sqlite
in compose env. Migrations run on startup via laravel-entrypoint.sh.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-04 11:36:08 +01:00

42 lines
1.1 KiB
YAML

# Production deployment for lthn.io
# FrankenPHP + Octane + Supervisor
#
# Usage:
# docker compose up -d --build
#
# Rebuilds pick up code changes from the working directory.
services:
app:
build: .
container_name: lthn-io
restart: unless-stopped
env_file: .env
environment:
APP_ENV: production
APP_DEBUG: "false"
OCTANE_SERVER: frankenphp
CACHE_STORE: file
SESSION_DRIVER: file
DB_CONNECTION: sqlite
DB_DATABASE: /app/database/database.sqlite
extra_hosts:
- "host.docker.internal:host-gateway"
volumes:
- ./.env:/app/.env:ro
labels:
traefik.enable: "true"
traefik.http.routers.lthn-io.rule: "Host(`lthn.io`) || Host(`testnet.lthn.io`) || Host(`api.lthn.io`) || Host(`docs.lthn.io`) || Host(`explorer.lthn.io`)"
traefik.http.routers.lthn-io.entrypoints: websecure
traefik.http.routers.lthn-io.tls: "true"
traefik.http.services.lthn-io.loadbalancer.server.port: "80"
traefik.docker.network: proxy
networks:
- proxy
- noc-net
networks:
proxy:
external: true
noc-net:
external: true