| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950 |
- services:
- postgres:
- image: postgres:16-alpine
- container_name: axonhub-postgres
- environment:
- POSTGRES_DB: axonhub
- POSTGRES_USER: axonhub
- POSTGRES_PASSWORD: ${DB_PASSWORD:-axonhub_password}
- volumes:
- - postgres_data:/var/lib/postgresql/data
- ports:
- - "5432:5432"
- networks:
- - axonhub-network
- restart: unless-stopped
- healthcheck:
- test: ["CMD-SHELL", "pg_isready -U axonhub"]
- interval: 10s
- timeout: 5s
- retries: 5
- axonhub:
- image: looplj/axonhub:latest
- container_name: axonhub-app
- environment:
- AXONHUB_DB_DIALECT: postgres
- AXONHUB_DB_DSN: postgres://axonhub:${DB_PASSWORD:-axonhub_password}@postgres:5432/axonhub?sslmode=disable
- ports:
- - "8090:8090"
- volumes:
- - ./config.yml:/app/config.yml:ro
- networks:
- - axonhub-network
- depends_on:
- postgres:
- condition: service_healthy
- restart: unless-stopped
- healthcheck:
- test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:8090/health"]
- interval: 30s
- timeout: 10s
- retries: 3
- start_period: 40s
- volumes:
- postgres_data:
- networks:
- axonhub-network:
- driver: bridge
|