mirror of
https://github.com/rishikanthc/Scriberr.git
synced 2026-07-01 08:15:46 +00:00
- Add healthcheck to web service to monitor application status - Update database healthcheck to use environment variables - Fix line endings in Dockerfile and Dockerfile-cuda128 - Update copyright year in LICENSE - Remove transcript.json (sample file no longer needed)
55 lines
1.3 KiB
YAML
55 lines
1.3 KiB
YAML
services:
|
|
app:
|
|
image: ghcr.io/rishikanthc/scriberr:${IMAGE_TAG:-main}
|
|
build:
|
|
context: .
|
|
platforms:
|
|
- linux/arm64
|
|
- linux/amd64
|
|
# No args needed as environment variables are passed at runtime
|
|
env_file:
|
|
- .env
|
|
environment:
|
|
- DATABASE_URL=postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@${POSTGRES_HOST}:${POSTGRES_PORT}/${POSTGRES_DB}
|
|
ports:
|
|
- "${PORT:-3000}:3000"
|
|
volumes:
|
|
- scriberr_data:/scriberr
|
|
networks:
|
|
- app-network
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "curl -f http://localhost:3000/health || exit 1"]
|
|
interval: 30s
|
|
timeout: 10s
|
|
retries: 5
|
|
depends_on:
|
|
db:
|
|
condition: service_healthy
|
|
restart: unless-stopped
|
|
|
|
db:
|
|
image: postgres:15-alpine
|
|
environment:
|
|
POSTGRES_USER: ${POSTGRES_USER}
|
|
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
|
|
POSTGRES_DB: ${POSTGRES_DB}
|
|
#ports:
|
|
# - "${POSTGRES_PORT:-5432}:5432"
|
|
volumes:
|
|
- postgres_data:/var/lib/postgresql/data
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U root -d ${POSTGRES_DB}"]
|
|
interval: 5s
|
|
timeout: 5s
|
|
retries: 5
|
|
networks:
|
|
- app-network
|
|
restart: unless-stopped
|
|
|
|
networks:
|
|
app-network:
|
|
driver: bridge
|
|
|
|
volumes:
|
|
postgres_data:
|
|
scriberr_data: |