woj-server/docker-compose.yml

101 lines
2.4 KiB
YAML

services:
server:
image: git.0x7f.app/woj/woj-server:1.2.3-dev
restart: unless-stopped
healthcheck:
test: [ "CMD", "wget", "-q", "-O", "/dev/null", "http://127.0.0.1:8000/health" ]
interval: 5s
command: server
environment:
- REDIS_ADDRESS=cache
- DATABASE_HOST=db
- DATABASE_USER=dev
- DATABASE_PASSWORD=password
- DATABASE_NAME=dev
- STORAGE_ENDPOINT=storage:9000
- STORAGE_ACCESS_KEY=access_key
- STORAGE_SECRET_KEY=secret_key
- STORAGE_BUCKET=woj
- DEVELOPMENT=true
volumes:
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
depends_on:
storage:
condition: service_healthy
cache:
condition: service_healthy
db:
condition: service_healthy
ports:
- "8000:8000"
runner:
image: git.0x7f.app/woj/woj-runner:1.2.3-dev
restart: unless-stopped
command: runner
privileged: true
cap_add:
- SYS_ADMIN
environment:
- REDIS_ADDRESS=cache
- STORAGE_ENDPOINT=storage:9000
- STORAGE_ACCESS_KEY=access_key
- STORAGE_SECRET_KEY=secret_key
- STORAGE_BUCKET=woj
- DEVELOPMENT=true
- START_CONTAINERD=true
volumes:
- runner:/app/resource/runner/user
- container:/var/lib/containerd
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
depends_on:
storage:
condition: service_healthy
cache:
condition: service_healthy
storage:
image: quay.io/minio/minio:latest
restart: unless-stopped
healthcheck:
test: [ "CMD", "curl", "-f", "http://127.0.0.1:9000/minio/health/live" ]
interval: 5s
entrypoint: sh
command: -c 'mkdir -p /data/woj && minio server /data'
environment:
MINIO_ROOT_USER: "access_key"
MINIO_ROOT_PASSWORD: "secret_key"
volumes:
- storage:/data
cache:
image: docker.io/library/redis:alpine
restart: unless-stopped
healthcheck:
test: [ "CMD", "redis-cli", "ping" ]
interval: 5s
volumes:
- cache:/data
db:
image: docker.io/library/postgres:16-alpine
restart: unless-stopped
healthcheck:
test: [ "CMD", "pg_isready", "-U", "dev" ]
interval: 5s
environment:
- POSTGRES_USER=dev
- POSTGRES_PASSWORD=password
- POSTGRES_DB=dev
volumes:
- db:/var/lib/postgresql/data
volumes:
runner:
container:
storage:
cache:
db: