Files
ente/server/compose.yaml
Manav Rathi a4ab3168ad Add note
2025-03-21 16:59:10 +05:30

111 lines
2.9 KiB
YAML

# Sample docker compose file, not meant for production use.
services:
museum:
build:
context: .
args:
GIT_COMMIT: development-cluster
ports:
- 8080:8080 # API
# - 2112:2112 # Prometheus metrics (uncomment to access externally)
depends_on:
postgres:
condition: service_healthy
environment:
ENTE_CREDENTIALS_FILE: /credentials.yaml
configs:
- source: credentials_yaml
target: /credentials.yaml
volumes:
- ./museum.yaml:/museum.yaml:ro
- ./data:/data:ro
# Resolve "localhost:3200" in the museum container to the minio container.
socat:
image: alpine/socat
network_mode: service:museum
depends_on: [museum]
command: "TCP-LISTEN:3200,fork,reuseaddr TCP:minio:3200"
postgres:
image: postgres:15
environment:
POSTGRES_USER: pguser
POSTGRES_PASSWORD: pgpass
POSTGRES_DB: ente_db
# Wait for postgres to accept connections before starting museum.
healthcheck:
test: pg_isready -q -d ente_db -U pguser
start_period: 40s
start_interval: 1s
volumes:
- postgres-data:/var/lib/postgresql/data
minio:
image: minio/minio
ports:
- 3200:3200 # MinIO API
# - 3201:3201 # MinIO Console (uncomment to access externally)
environment:
MINIO_ROOT_USER: changeme
MINIO_ROOT_PASSWORD: changeme1234
command: server /data --address ":3200" --console-address ":3201"
volumes:
- minio-data:/data
post_start:
- command: |
sh -c '
#!/bin/sh
while ! mc config host add h0 http://minio:3200 changeme changeme1234 2>/dev/null
do
echo "Waiting for minio..."
sleep 0.5
done
cd /data
mc mb -p b2-eu-cen
mc mb -p wasabi-eu-central-2-v3
mc mb -p scw-eu-fr-v3
'
configs:
credentials_yaml:
# You'll need to recreate the containers (docker compose down && docker
# compose up) when changing this inline config for the changes to apply.
content: |
db:
host: postgres
port: 5432
name: ente_db
user: pguser
password: pgpass
s3:
are_local_buckets: true
b2-eu-cen:
key: changeme
secret: changeme1234
endpoint: localhost:3200
region: eu-central-2
bucket: b2-eu-cen
wasabi-eu-central-2-v3:
key: changeme
secret: changeme1234
endpoint: localhost:3200
region: eu-central-2
bucket: wasabi-eu-central-2-v3
compliance: false
scw-eu-fr-v3:
key: changeme
secret: changeme1234
endpoint: localhost:3200
region: eu-central-2
bucket: scw-eu-fr-v3
volumes:
postgres-data:
minio-data: