Deploy: docker-compose.yml mit PostgreSQL-Service
This commit is contained in:
parent
265188a136
commit
70880a7e20
|
|
@ -1,19 +1,35 @@
|
|||
services:
|
||||
postgres:
|
||||
image: postgres:16-alpine
|
||||
container_name: itsm_postgres
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
POSTGRES_DB: itsm
|
||||
POSTGRES_USER: itsm
|
||||
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-}
|
||||
volumes:
|
||||
- ./pgdata:/var/lib/postgresql/data
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "pg_isready -U itsm -d itsm"]
|
||||
interval: 5s
|
||||
timeout: 5s
|
||||
retries: 10
|
||||
|
||||
itsm:
|
||||
image: python:3.12-slim
|
||||
container_name: itsm_app
|
||||
command: ["sh", "/bootstrap.sh"]
|
||||
restart: unless-stopped
|
||||
depends_on:
|
||||
postgres:
|
||||
condition: service_healthy
|
||||
ports:
|
||||
- "8090:8090"
|
||||
environment:
|
||||
ITSM_DATA_DIR: /data
|
||||
ITSM_USER: ${ITSM_USER:-moe}
|
||||
ITSM_PASSWORD: ${ITSM_PASSWORD:-}
|
||||
DATABASE_URL: postgresql://itsm:${POSTGRES_PASSWORD:-}@postgres:5432/itsm
|
||||
ITSM_SECRET_KEY: ${ITSM_SECRET_KEY:-}
|
||||
AES_DASHBOARD_URL: ${AES_DASHBOARD_URL:-http://host.docker.internal:8080}
|
||||
volumes:
|
||||
- ./data:/data
|
||||
- ./bootstrap.sh:/bootstrap.sh:ro
|
||||
extra_hosts:
|
||||
- "host.docker.internal:host-gateway"
|
||||
|
|
|
|||
Loading…
Reference in New Issue