services:
mariadb:
image: mariadb:11.4
restart: unless-stopped
ports:
- "127.0.0.1:${MARIADB_PORT:-4520}:${MARIADB_PORT:-4520}"
expose:
- "${MARIADB_PORT:-4520}"
command: ["--port", "${MARIADB_PORT:-4520}", "--max-allowed-packet=1G"]
environment:
MARIADB_ROOT_PASSWORD: "${MARIADB_ROOT_PASSWORD}"
MARIADB_DATABASE: "${MARIADB_DATABASE}"
MARIADB_USER: "${MARIADB_USER}"
MARIADB_PASSWORD: "${MARIADB_PASSWORD}"
volumes:
- mariadb-data:/var/lib/mysql
healthcheck:
test: ["CMD", "healthcheck.sh", "--connect", "--innodb_initialized"]
interval: 5s
timeout: 5s
retries: 12
start_period: 30s
mailpit:
image: axllent/mailpit:v1.28.2
restart: unless-stopped
ports:
- "127.0.0.1:${MAILPIT_UI_PORT:-8025}:8025"
- "127.0.0.1:${MAILPIT_SMTP_PORT:-1025}:1025"
expose:
- "1025"
- "8025"
spacetimedb-init:
image: busybox:1.37
profiles: ["spacetime"]
command: ["sh", "-c", "mkdir -p /data /config && chown -R 1000:1000 /data /config"]
volumes:
- spacetimedb-data:/data
- spacetimedb-config:/config
spacetimedb:
image: clockworklabs/spacetime:v2.11.0
profiles: ["spacetime"]
restart: unless-stopped
depends_on:
spacetimedb-init:
condition: service_completed_successfully
command: ["start", "--listen-addr=0.0.0.0:3000"]
ports:
- "127.0.0.1:${SPACETIME_PORT:-4530}:3000"
expose:
- "3000"
healthcheck:
test: ["CMD", "curl", "--fail", "--silent", "--show-error", "--output", "/dev/null", "--max-time", "3", "http://127.0.0.1:3000/v1/ping"]
interval: 5s
timeout: 5s
retries: 12
volumes:
- spacetimedb-data:/home/spacetime/.local/share/spacetime/data
- spacetimedb-config:/home/spacetime/.config/spacetime
volumes:
mariadb-data:
spacetimedb-data:
spacetimedb-config: