Files
duty-teller/entrypoint.sh
Nikolay Tatarinov f53ef81306
All checks were successful
CI / lint-and-test (push) Successful in 22s
chore: update Docker configuration and improve health check functionality
- Added Docker health check endpoint to the FastAPI application, returning a 200 status when the app is running.
- Updated Dockerfile to include curl for health checks and modified entrypoint script to exit on errors.
- Enhanced .dockerignore and .gitignore files to exclude coverage and test artifacts.
- Updated docker-compose.prod.yml to specify version.
- Added pytest-cov as a development dependency to improve test coverage reporting.
2026-02-20 20:31:43 +03:00

12 lines
399 B
Bash

#!/bin/sh
set -eu
# Ensure data dir exists and is writable by botuser (volume may be root-owned)
mkdir -p /app/data
chown botuser:botuser /app/data
# Apply Alembic migrations (runs as root, creates DB in /app/data)
alembic -c pyproject.toml upgrade head
# Ensure new DB file is owned by botuser so the app can write
chown -R botuser:botuser /app/data
# Run the app as botuser
exec gosu botuser "$@"