80 lines
2.3 KiB
YAML
80 lines
2.3 KiB
YAML
# Zipline - ShareX/Flameshot szerver - screenshot és fájlmegosztás
|
|
# Domain: img.${DOMAIN}
|
|
# Database: postgres
|
|
# RAM: ~100M (mem_limit: 512M) | Pi-compatible: No
|
|
#
|
|
# Environment variables:
|
|
# DOMAIN - Your domain (e.g., demo-felhom.eu)
|
|
# CORE_SECRET - Titkosítási kulcs (auto-generated)
|
|
# DB_PASSWORD - Adatbázis jelszó (auto-generated)
|
|
|
|
services:
|
|
zipline:
|
|
image: ghcr.io/diced/zipline:4.0.0
|
|
container_name: zipline
|
|
restart: unless-stopped
|
|
depends_on:
|
|
zipline-postgres:
|
|
condition: service_healthy
|
|
environment:
|
|
- TZ=Europe/Budapest
|
|
- CORE_SECRET=${CORE_SECRET}
|
|
- CORE_DATABASE_URL=postgresql://zipline:${DB_PASSWORD}@zipline-postgres:5432/zipline
|
|
volumes:
|
|
- zipline_uploads:/zipline/uploads
|
|
- zipline_public:/zipline/public
|
|
networks:
|
|
- traefik-public
|
|
- zipline-internal
|
|
deploy:
|
|
resources:
|
|
limits:
|
|
memory: 512M
|
|
healthcheck:
|
|
test: ["CMD", "node", "-e", "const http = require('http'); http.get('http://localhost:3000/api/health', (r) => { process.exit(r.statusCode === 200 ? 0 : 1) }).on('error', () => process.exit(1))"]
|
|
interval: 30s
|
|
timeout: 5s
|
|
retries: 3
|
|
start_period: 30s
|
|
labels:
|
|
- "traefik.enable=true"
|
|
- "traefik.http.routers.zipline.rule=Host(`img.${DOMAIN}`)"
|
|
- "traefik.http.routers.zipline.entrypoints=websecure"
|
|
- "traefik.http.routers.zipline.tls=true"
|
|
- "traefik.http.routers.zipline.tls.certresolver=letsencrypt"
|
|
- "traefik.http.services.zipline.loadbalancer.server.port=3000"
|
|
|
|
zipline-postgres:
|
|
image: postgres:16-alpine
|
|
container_name: zipline-postgres
|
|
restart: unless-stopped
|
|
environment:
|
|
- POSTGRES_USER=zipline
|
|
- POSTGRES_PASSWORD=${DB_PASSWORD}
|
|
- POSTGRES_DB=zipline
|
|
- TZ=Europe/Budapest
|
|
volumes:
|
|
- zipline_postgres_data:/var/lib/postgresql/data
|
|
networks:
|
|
- zipline-internal
|
|
deploy:
|
|
resources:
|
|
limits:
|
|
memory: 256M
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U zipline -d zipline"]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 5
|
|
start_period: 20s
|
|
|
|
volumes:
|
|
zipline_postgres_data:
|
|
zipline_public:
|
|
zipline_uploads:
|
|
|
|
networks:
|
|
traefik-public:
|
|
external: true
|
|
zipline-internal:
|