newdrive/compose.yaml
Elijah f24e96efa7
All checks were successful
CI / Backend (push) Successful in 29s
CI / Frontend (push) Successful in 9m27s
CI / Contracts and repository policy (push) Successful in 7s
CI / Container (push) Successful in 18s
Harden CI and switch release builds to tagged immutable images
2026-07-15 19:21:07 -07:00

61 lines
1.6 KiB
YAML

name: drive-v2
services:
postgres:
image: postgres:18.4-bookworm
restart: unless-stopped
environment:
POSTGRES_DB: ${POSTGRES_DB:-drive}
POSTGRES_USER: ${POSTGRES_USER:-drive}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-drive-development-only}
POSTGRES_INITDB_ARGS: --data-checksums
volumes:
- ./.data/postgres:/var/lib/postgresql
healthcheck:
test: ["CMD-SHELL", "pg_isready -U $${POSTGRES_USER} -d $${POSTGRES_DB}"]
interval: 5s
timeout: 5s
retries: 10
networks: [drive-internal]
drive:
build:
context: .
args:
VERSION: ${DRIVE_VERSION:-dev}
restart: unless-stopped
depends_on:
postgres:
condition: service_healthy
environment:
DRIVE_HTTP_ADDRESS: :8080
DRIVE_WEB_ROOT: /app/web
DRIVE_STORAGE_ROOT: /storage/.drive
DRIVE_PREVIEW_CACHE_ROOT: /cache/previews
DRIVE_DATABASE_URL: postgres://${POSTGRES_USER:-drive}:${POSTGRES_PASSWORD:-drive-development-only}@postgres:5432/${POSTGRES_DB:-drive}?sslmode=disable
DRIVE_LOG_LEVEL: ${DRIVE_LOG_LEVEL:-info}
ports:
- "${DRIVE_HTTP_PORT:-8080}:8080"
volumes:
- ./.data/storage:/storage
- ./.data/config:/config
- ./.data/previews:/cache/previews
read_only: true
tmpfs:
- /tmp:size=256m,mode=1777
security_opt:
- no-new-privileges:true
cap_drop: [ALL]
networks: [drive-internal]
verify:
profiles: [tools]
build:
context: .
target: verify
command: ["sh", "scripts/verify.sh"]
networks:
drive-internal:
internal: true