2023-07-15 18:14:50 +08:00
|
|
|
services:
|
|
|
|
server:
|
2024-01-27 19:11:26 +08:00
|
|
|
image: git.0x7f.app/woj/woj-server:1.2.3-dev
|
2023-07-15 18:14:50 +08:00
|
|
|
restart: unless-stopped
|
2023-07-16 15:40:45 +08:00
|
|
|
healthcheck:
|
2023-08-11 18:54:00 +08:00
|
|
|
test: [ "CMD", "wget", "-q", "-O", "/dev/null", "http://127.0.0.1:8000/health" ]
|
2023-07-16 15:40:45 +08:00
|
|
|
interval: 5s
|
2023-12-19 01:09:02 +08:00
|
|
|
command: server
|
2023-07-15 18:14:50 +08:00
|
|
|
environment:
|
2023-12-18 23:43:27 +08:00
|
|
|
- REDIS_ADDRESS=cache
|
2023-07-15 18:14:50 +08:00
|
|
|
- DATABASE_HOST=db
|
|
|
|
- DATABASE_USER=dev
|
|
|
|
- DATABASE_PASSWORD=password
|
|
|
|
- DATABASE_NAME=dev
|
2023-08-11 18:54:00 +08:00
|
|
|
- STORAGE_ENDPOINT=storage:9000
|
2023-07-15 18:14:50 +08:00
|
|
|
- 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"
|
|
|
|
|
2023-08-11 18:54:00 +08:00
|
|
|
runner:
|
2024-01-27 19:11:26 +08:00
|
|
|
image: git.0x7f.app/woj/woj-runner:1.2.3-dev
|
2023-08-11 18:54:00 +08:00
|
|
|
restart: unless-stopped
|
|
|
|
command: runner
|
2024-01-27 19:11:26 +08:00
|
|
|
privileged: true
|
2023-08-11 18:54:00 +08:00
|
|
|
cap_add:
|
|
|
|
- SYS_ADMIN
|
|
|
|
environment:
|
2023-12-18 23:43:27 +08:00
|
|
|
- REDIS_ADDRESS=cache
|
2023-08-11 18:54:00 +08:00
|
|
|
- STORAGE_ENDPOINT=storage:9000
|
|
|
|
- STORAGE_ACCESS_KEY=access_key
|
|
|
|
- STORAGE_SECRET_KEY=secret_key
|
|
|
|
- STORAGE_BUCKET=woj
|
|
|
|
- DEVELOPMENT=true
|
2024-01-27 19:11:26 +08:00
|
|
|
- START_CONTAINERD=true
|
2023-08-11 18:54:00 +08:00
|
|
|
volumes:
|
|
|
|
- runner:/app/resource/runner/user
|
2024-01-27 19:11:26 +08:00
|
|
|
- container:/var/lib/containerd
|
2023-08-11 18:54:00 +08:00
|
|
|
- /etc/timezone:/etc/timezone:ro
|
|
|
|
- /etc/localtime:/etc/localtime:ro
|
|
|
|
depends_on:
|
|
|
|
storage:
|
|
|
|
condition: service_healthy
|
|
|
|
cache:
|
|
|
|
condition: service_healthy
|
2023-07-15 18:14:50 +08:00
|
|
|
|
|
|
|
storage:
|
2023-08-11 18:54:00 +08:00
|
|
|
image: quay.io/minio/minio:latest
|
2023-07-15 18:14:50 +08:00
|
|
|
restart: unless-stopped
|
|
|
|
healthcheck:
|
2023-07-16 15:40:45 +08:00
|
|
|
test: [ "CMD", "curl", "-f", "http://127.0.0.1:9000/minio/health/live" ]
|
2023-07-15 18:14:50 +08:00
|
|
|
interval: 5s
|
|
|
|
entrypoint: sh
|
|
|
|
command: -c 'mkdir -p /data/woj && minio server /data'
|
|
|
|
environment:
|
2023-08-11 18:54:00 +08:00
|
|
|
MINIO_ROOT_USER: "access_key"
|
|
|
|
MINIO_ROOT_PASSWORD: "secret_key"
|
2023-07-15 18:14:50 +08:00
|
|
|
volumes:
|
|
|
|
- storage:/data
|
|
|
|
|
|
|
|
cache:
|
2023-08-11 18:54:00 +08:00
|
|
|
image: docker.io/library/redis:alpine
|
2023-07-15 18:14:50 +08:00
|
|
|
restart: unless-stopped
|
|
|
|
healthcheck:
|
|
|
|
test: [ "CMD", "redis-cli", "ping" ]
|
|
|
|
interval: 5s
|
|
|
|
volumes:
|
|
|
|
- cache:/data
|
|
|
|
|
|
|
|
db:
|
2023-12-23 16:46:34 +08:00
|
|
|
image: docker.io/library/postgres:16-alpine
|
2023-07-15 18:14:50 +08:00
|
|
|
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:
|
|
|
|
storage:
|
|
|
|
cache:
|
2023-08-11 18:54:00 +08:00
|
|
|
db:
|