mirror of
https://github.com/hanzoai/analytics.git
synced 2026-10-30 15:05:29 +00:00
37 lines
933 B
YAML
37 lines
933 B
YAML
---
|
|
services:
|
|
analytics:
|
|
image: ghcr.io/hanzoai/analytics:postgresql-latest
|
|
ports:
|
|
- "3000:3000"
|
|
environment:
|
|
DATABASE_URL: postgresql://analytics:analytics@db:5432/analytics
|
|
DATABASE_TYPE: postgresql
|
|
APP_SECRET: replace-me-with-a-random-string
|
|
depends_on:
|
|
db:
|
|
condition: service_healthy
|
|
init: true
|
|
restart: always
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "curl http://localhost:3000/api/heartbeat"]
|
|
interval: 5s
|
|
timeout: 5s
|
|
retries: 5
|
|
db:
|
|
image: postgres:15-alpine
|
|
environment:
|
|
POSTGRES_DB: analytics
|
|
POSTGRES_USER: analytics
|
|
POSTGRES_PASSWORD: analytics
|
|
volumes:
|
|
- analytics-db-data:/var/lib/postgresql/data
|
|
restart: always
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U $${POSTGRES_USER} -d $${POSTGRES_DB}"]
|
|
interval: 5s
|
|
timeout: 5s
|
|
retries: 5
|
|
volumes:
|
|
analytics-db-data:
|