mirror of
https://github.com/snapotter-hq/SnapOtter.git
synced 2026-08-03 07:46:42 +02:00
fix(docker): restore Postgres/Redis in GPU compose stack + pause image publishing
Restore Postgres 17 + Redis 8 services in docker-compose-gpu.yml; re-add if:false publish pause on the release.yml docker job (main had lost it).
This commit is contained in:
@@ -169,6 +169,13 @@ jobs:
|
|||||||
docker:
|
docker:
|
||||||
name: Build (${{ matrix.platform }})
|
name: Build (${{ matrix.platform }})
|
||||||
needs: release
|
needs: release
|
||||||
|
# PUBLISHING PAUSED (2026-06-17): building and pushing the app image to
|
||||||
|
# Docker Hub + GHCR is disabled while the app is still being stabilized.
|
||||||
|
# The scan, sbom, ai-bundles, and manifest jobs all `need` this job, so
|
||||||
|
# they are skipped too and nothing reaches either registry. The release,
|
||||||
|
# changelog, and source-archive (prebuilt) jobs still run.
|
||||||
|
# To resume publishing, delete the `if: ${{ false }}` line below.
|
||||||
|
if: ${{ false }}
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
packages: write
|
packages: write
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ services:
|
|||||||
# - "127.0.0.1:1349:1349"
|
# - "127.0.0.1:1349:1349"
|
||||||
- "1349:1349"
|
- "1349:1349"
|
||||||
volumes:
|
volumes:
|
||||||
- SnapOtter-data:/data # Database, AI models, user files
|
- SnapOtter-data:/data # AI models, user files
|
||||||
- SnapOtter-workspace:/tmp/workspace # Temp processing (auto-cleaned)
|
- SnapOtter-workspace:/tmp/workspace # Temp processing (auto-cleaned)
|
||||||
environment:
|
environment:
|
||||||
- AUTH_ENABLED=true
|
- AUTH_ENABLED=true
|
||||||
@@ -37,6 +37,11 @@ services:
|
|||||||
- MAX_USERS=${MAX_USERS:-0}
|
- MAX_USERS=${MAX_USERS:-0}
|
||||||
- SESSION_DURATION_HOURS=${SESSION_DURATION_HOURS:-168}
|
- SESSION_DURATION_HOURS=${SESSION_DURATION_HOURS:-168}
|
||||||
- TRUST_PROXY=${TRUST_PROXY:-true}
|
- TRUST_PROXY=${TRUST_PROXY:-true}
|
||||||
|
- DATABASE_URL=postgres://${POSTGRES_USER:-snapotter}:${POSTGRES_PASSWORD:-snapotter}@postgres:5432/${POSTGRES_DB:-snapotter}
|
||||||
|
- REDIS_URL=redis://redis:6379
|
||||||
|
# 1.x upgrade: uncomment to import the old SQLite database on first boot;
|
||||||
|
# re-comment after the migration succeeds.
|
||||||
|
# - SQLITE_MIGRATE_PATH=/data/snapotter.db
|
||||||
# OIDC Authentication (optional)
|
# OIDC Authentication (optional)
|
||||||
# - EXTERNAL_URL=https://photos.example.com
|
# - EXTERNAL_URL=https://photos.example.com
|
||||||
# - OIDC_ENABLED=false
|
# - OIDC_ENABLED=false
|
||||||
@@ -61,6 +66,11 @@ services:
|
|||||||
# - COOKIE_SECRET_FILE=/run/secrets/cookie_secret
|
# - COOKIE_SECRET_FILE=/run/secrets/cookie_secret
|
||||||
# - SNAPOTTER_LICENSE_KEY_FILE=/run/secrets/license_key
|
# - SNAPOTTER_LICENSE_KEY_FILE=/run/secrets/license_key
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
|
depends_on:
|
||||||
|
postgres:
|
||||||
|
condition: service_healthy
|
||||||
|
redis:
|
||||||
|
condition: service_healthy
|
||||||
# --- Security hardening ---
|
# --- Security hardening ---
|
||||||
mem_limit: 8g
|
mem_limit: 8g
|
||||||
memswap_limit: 8g
|
memswap_limit: 8g
|
||||||
@@ -100,6 +110,38 @@ services:
|
|||||||
max-size: "50m"
|
max-size: "50m"
|
||||||
max-file: "5"
|
max-file: "5"
|
||||||
|
|
||||||
|
postgres:
|
||||||
|
image: postgres:17-alpine
|
||||||
|
container_name: SnapOtter-postgres
|
||||||
|
environment:
|
||||||
|
POSTGRES_USER: ${POSTGRES_USER:-snapotter}
|
||||||
|
# Set a strong password -- CHANGE THIS for any non-local deployment.
|
||||||
|
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-snapotter}
|
||||||
|
POSTGRES_DB: ${POSTGRES_DB:-snapotter}
|
||||||
|
volumes:
|
||||||
|
- SnapOtter-pgdata:/var/lib/postgresql/data
|
||||||
|
restart: unless-stopped
|
||||||
|
healthcheck:
|
||||||
|
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-snapotter}"]
|
||||||
|
interval: 10s
|
||||||
|
timeout: 5s
|
||||||
|
retries: 12
|
||||||
|
start_period: 15s
|
||||||
|
|
||||||
|
redis:
|
||||||
|
image: redis:8-alpine
|
||||||
|
container_name: SnapOtter-redis
|
||||||
|
command: ["redis-server", "--maxmemory-policy", "noeviction", "--appendonly", "yes"]
|
||||||
|
volumes:
|
||||||
|
- SnapOtter-redisdata:/data
|
||||||
|
restart: unless-stopped
|
||||||
|
healthcheck:
|
||||||
|
test: ["CMD", "redis-cli", "ping"]
|
||||||
|
interval: 10s
|
||||||
|
timeout: 5s
|
||||||
|
retries: 12
|
||||||
|
start_period: 10s
|
||||||
|
|
||||||
# Uncomment to use Docker secrets (requires Docker Swarm or compose v2.23+):
|
# Uncomment to use Docker secrets (requires Docker Swarm or compose v2.23+):
|
||||||
# secrets:
|
# secrets:
|
||||||
# snapotter_password:
|
# snapotter_password:
|
||||||
@@ -110,3 +152,5 @@ services:
|
|||||||
volumes:
|
volumes:
|
||||||
SnapOtter-data:
|
SnapOtter-data:
|
||||||
SnapOtter-workspace:
|
SnapOtter-workspace:
|
||||||
|
SnapOtter-pgdata:
|
||||||
|
SnapOtter-redisdata:
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ services:
|
|||||||
# - "127.0.0.1:1349:1349"
|
# - "127.0.0.1:1349:1349"
|
||||||
- "1349:1349"
|
- "1349:1349"
|
||||||
volumes:
|
volumes:
|
||||||
- SnapOtter-data:/data # Database, AI models, user files
|
- SnapOtter-data:/data # AI models, user files
|
||||||
- SnapOtter-workspace:/tmp/workspace # Temp processing (auto-cleaned)
|
- SnapOtter-workspace:/tmp/workspace # Temp processing (auto-cleaned)
|
||||||
environment:
|
environment:
|
||||||
- AUTH_ENABLED=true
|
- AUTH_ENABLED=true
|
||||||
|
|||||||
Reference in New Issue
Block a user