feat: initial MALS implementation — Phase 1
This commit is contained in:
57
docker-compose.portainer.yml
Normal file
57
docker-compose.portainer.yml
Normal file
@@ -0,0 +1,57 @@
|
||||
# Portainer / Docker Swarm deployment variant.
|
||||
# Use this stack file in Portainer's "Add Stack" UI.
|
||||
# Adjust Traefik labels for your domain and router names.
|
||||
|
||||
services:
|
||||
postgres:
|
||||
image: postgres:16-alpine
|
||||
environment:
|
||||
POSTGRES_DB: ${POSTGRES_DB:-mals}
|
||||
POSTGRES_USER: ${POSTGRES_USER:-mals}
|
||||
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
|
||||
volumes:
|
||||
- postgres_data:/var/lib/postgresql/data
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-mals}"]
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
networks:
|
||||
- mals_internal
|
||||
deploy:
|
||||
replicas: 1
|
||||
resources:
|
||||
limits:
|
||||
memory: 512M
|
||||
|
||||
api:
|
||||
image: ${MALS_IMAGE:-mals:latest}
|
||||
environment:
|
||||
DATABASE_URL: postgresql+asyncpg://${POSTGRES_USER:-mals}:${POSTGRES_PASSWORD}@postgres:5432/${POSTGRES_DB:-mals}
|
||||
MALS_API_KEY: ${MALS_API_KEY}
|
||||
MALS_PORT: ${MALS_PORT:-8421}
|
||||
LOG_LEVEL: ${LOG_LEVEL:-INFO}
|
||||
networks:
|
||||
- mals_internal
|
||||
- traefik_public
|
||||
depends_on:
|
||||
- postgres
|
||||
deploy:
|
||||
replicas: 1
|
||||
resources:
|
||||
limits:
|
||||
memory: 512M
|
||||
labels:
|
||||
- "traefik.enable=true"
|
||||
- "traefik.http.routers.mals.rule=Host(`${MALS_DOMAIN:-mals.internal}`)"
|
||||
- "traefik.http.routers.mals.entrypoints=websecure"
|
||||
- "traefik.http.routers.mals.tls=true"
|
||||
- "traefik.http.services.mals.loadbalancer.server.port=8421"
|
||||
|
||||
networks:
|
||||
mals_internal:
|
||||
traefik_public:
|
||||
external: true
|
||||
|
||||
volumes:
|
||||
postgres_data:
|
||||
Reference in New Issue
Block a user