woj-server/docker-compose.yml

86 lines
1.9 KiB
YAML

version: "3"
services:
server:
build: .
restart: unless-stopped
command: web
environment:
- REDIS_ADDRESS_PORT=cache:6379
- DATABASE_HOST=db
- DATABASE_USER=dev
- DATABASE_PASSWORD=password
- DATABASE_NAME=dev
- STORAGE_ENDPOINT=minio: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:
# build: .
# restart: unless-stopped
# command: runner
# environment:
# - REDIS_ADDRESS_PORT=cache:6379
# - DEVELOPMENT=true
# volumes:
# - runner:/app/resource/runner/user
# - /etc/timezone:/etc/timezone:ro
# - /etc/localtime:/etc/localtime:ro
# depends_on:
# - cache
storage:
image: minio/minio:latest
restart: unless-stopped
healthcheck:
test: [ "CMD", "echo", "ok" ]
interval: 5s
entrypoint: sh
command: -c 'mkdir -p /data/woj && minio server /data'
environment:
MINIO_ACCESS_KEY: "access_key"
MINIO_SECRET_KEY: "secret_key"
volumes:
- storage:/data
cache:
image: redis:alpine
restart: unless-stopped
healthcheck:
test: [ "CMD", "redis-cli", "ping" ]
interval: 5s
volumes:
- cache:/data
db:
image: postgres: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:
storage:
cache:
db: