Files
ente/compose.template.yml
T
Kappeh 4384267954
Deploy / Deploy (push) Successful in 25s
Migrate to named docker volumes
2026-07-19 19:01:23 +01:00

186 lines
5.0 KiB
YAML

services:
init:
image: busybox:1.37.0
user: root:root
command: /init.sh
restart: no
network_mode: none
volumes:
- ./init.sh:/init.sh:ro
# Used for resolving user and group names within the init script
- /etc/passwd:/etc/passwd:ro
- /etc/group:/etc/group:ro
# Mount all named volumes so they can be initialised
- minio_data:/minio_data:rw
- museum_data:/museum_data:rw
- postgres_data:/postgres_data:rw
# Temporary mounts for migrating data
- /mnt/ente_1/minio_data:/minio_data_old:ro
- /mnt/ente_1/museum_data:/museum_data_old:ro
- /mnt/ente_1/postgres_data:/postgres_data_old:ro
labels:
diun.enable: "true"
diun.watch_repo: "true"
diun.include_tags: "latest"
museum:
container_name: ente_museum
image: ghcr.io/ente/server:0137a0c754ac0fe4f2c4c7421727c349327eb990
restart: unless-stopped
user: 2008:2008 # ente:ente
environment:
- GIN_MODE=release
networks:
- ente_network
ports:
- 8080:8080 # API
depends_on:
init:
condition: service_completed_successfully
restart: true
postgres:
condition: service_healthy
volumes:
- ./museum.yaml:/museum.yaml:ro
- /mnt/ente_1/museum_data:/data:ro
healthcheck:
test: ["CMD", "wget", "--quiet", "--tries=1", "--spider", "http://localhost:8080/ping"]
interval: 60s
timeout: 5s
retries: 3
start_period: 120s
labels:
diun.enable: "true"
diun.watch_repo: "true"
diun.include_tags: "latest"
# Resolve "localhost:3200" in the museum container to the minio container.
socat:
container_name: ente_socat
image: alpine/socat:1.8.0.3
restart: unless-stopped
user: 2008:2008 # ente:ente
network_mode: service:museum
depends_on: [museum]
command: "TCP-LISTEN:3200,fork,reuseaddr TCP:minio:3200"
web:
container_name: ente_web
image: ghcr.io/ente/web
restart: unless-stopped
# user: 2008:2008 # ente:ente
networks:
- ente_network
# Uncomment what you need to tweak.
ports:
# - 3001:3001 # Accounts
- 3002:3002 # Public albums
# - 3003:3003 # Auth
# - 3004:3004 # Cast
# - 3005:3005 # Share
# - 3006:3006 # Embed
- 3007:3000 # Photos web app
# Modify these values to your custom subdomains, if using any
environment:
ENTE_API_ORIGIN: https://api.ente.kappeh.org # http://localhost:8080
ENTE_ALBUMS_ORIGIN: https://albums.ente.kappeh.org # https://localhost:3002
ENTE_PHOTOS_ORIGIN: https://photos.ente.kappeh.org # http://localhost:3007
labels:
diun.enable: "true"
diun.watch_repo: "true"
diun.include_tags: "latest"
postgres:
container_name: ente_postgres
image: postgres:15
restart: unless-stopped
user: 2008:2008 # ente:ente
depends_on:
init:
condition: service_completed_successfully
restart: true
networks:
- ente_network
secrets:
- postgres_password
environment:
POSTGRES_USER: pguser
POSTGRES_PASSWORD_FILE: /run/secrets/postgres_password
POSTGRES_DB: ente_db
PGDATA: /var/lib/postgresql/data/pgdata
healthcheck:
test: pg_isready -q -d ente_db -U pguser
start_period: 40s
start_interval: 1s
volumes:
- /etc/passwd:/etc/passwd:ro
- /mnt/ente_1/postgres_data:/var/lib/postgresql/data:rw
labels:
diun.enable: "false"
diun.watch_repo: "true"
diun.include_tags: "latest"
minio:
container_name: ente_minio
image: minio/minio:RELEASE.2025-09-07T16-13-09Z
restart: unless-stopped
user: 2008:2008 # ente:ente
depends_on:
init:
condition: service_completed_successfully
restart: true
networks:
- ente_network
ports:
- 3200:3200 # MinIO API
# Uncomment to enable MinIO Web UI
# - 3201:3201
secrets:
- minio_root_user
- minio_root_password
environment:
MINIO_ROOT_USER_FILE: /run/secrets/minio_root_user
MINIO_ROOT_PASSWORD_FILE: /run/secrets/minio_root_password
command: server /data --address ":3200" --console-address ":3201"
volumes:
- /mnt/ente_1/minio_data:/data:rw
post_start:
- command: |
sh -c '
#!/bin/sh
while ! mc alias set h0 http://minio:3200 ${CFG_ENTE_MINIO_ROOT_USER} ${CFG_ENTE_MINIO_ROOT_PASSWORD} 2>/dev/null
do
echo "Waiting for minio..."
sleep 0.5
done
cd /data
mc mb -p b2-eu-cen || true
mc mb -p wasabi-eu-central-2-v3 || true
mc mb -p scw-eu-fr-v3 || true
'
labels:
diun.enable: "true"
diun.watch_repo: "true"
diun.include_tags: "latest"
volumes:
minio_data:
museum_data:
postgres_data:
networks:
ente_network:
name: ente_network
secrets:
postgres_password:
environment: ENTE_POSTGRES_PASSWORD
minio_root_user:
environment: ENTE_MINIO_ROOT_USER
minio_root_password:
environment: ENTE_MINIO_ROOT_PASSWORD