Initial import
This commit is contained in:
94
infra/compose/docker-compose.example.yml
Normal file
94
infra/compose/docker-compose.example.yml
Normal file
@@ -0,0 +1,94 @@
|
||||
name: nproxy
|
||||
|
||||
services:
|
||||
migrate:
|
||||
build:
|
||||
context: ../..
|
||||
dockerfile: infra/docker/migrate.Dockerfile
|
||||
env_file:
|
||||
- ../../.env
|
||||
depends_on:
|
||||
postgres:
|
||||
condition: service_healthy
|
||||
restart: "no"
|
||||
|
||||
web:
|
||||
build:
|
||||
context: ../..
|
||||
dockerfile: infra/docker/web.Dockerfile
|
||||
env_file:
|
||||
- ../../.env
|
||||
depends_on:
|
||||
migrate:
|
||||
condition: service_completed_successfully
|
||||
postgres:
|
||||
condition: service_healthy
|
||||
|
||||
worker:
|
||||
build:
|
||||
context: ../..
|
||||
dockerfile: infra/docker/worker.Dockerfile
|
||||
env_file:
|
||||
- ../../.env
|
||||
depends_on:
|
||||
migrate:
|
||||
condition: service_completed_successfully
|
||||
postgres:
|
||||
condition: service_healthy
|
||||
|
||||
bot:
|
||||
build:
|
||||
context: ../..
|
||||
dockerfile: infra/docker/bot.Dockerfile
|
||||
env_file:
|
||||
- ../../.env
|
||||
depends_on:
|
||||
migrate:
|
||||
condition: service_completed_successfully
|
||||
postgres:
|
||||
condition: service_healthy
|
||||
|
||||
postgres:
|
||||
image: postgres:16-alpine
|
||||
environment:
|
||||
POSTGRES_DB: nproxy
|
||||
POSTGRES_USER: nproxy
|
||||
POSTGRES_PASSWORD: nproxy
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "pg_isready -U nproxy -d nproxy"]
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
volumes:
|
||||
- postgres-data:/var/lib/postgresql/data
|
||||
|
||||
caddy:
|
||||
image: caddy:2
|
||||
depends_on:
|
||||
- web
|
||||
ports:
|
||||
- "80:80"
|
||||
- "443:443"
|
||||
volumes:
|
||||
- ../caddy/Caddyfile:/etc/caddy/Caddyfile:ro
|
||||
- caddy-data:/data
|
||||
- caddy-config:/config
|
||||
|
||||
minio:
|
||||
profiles: ["local-storage"]
|
||||
image: minio/minio:latest
|
||||
command: server /data --console-address :9001
|
||||
environment:
|
||||
MINIO_ROOT_USER: ${MINIO_ROOT_USER}
|
||||
MINIO_ROOT_PASSWORD: ${MINIO_ROOT_PASSWORD}
|
||||
ports:
|
||||
- "9000:9000"
|
||||
- "9001:9001"
|
||||
volumes:
|
||||
- minio-data:/data
|
||||
|
||||
volumes:
|
||||
postgres-data:
|
||||
caddy-data:
|
||||
caddy-config:
|
||||
minio-data:
|
||||
Reference in New Issue
Block a user