Files
duty-teller/entrypoint.sh
Nikolay Tatarinov d60a4fdf3f Enhance Telegram bot with database integration and API features
- Added SQLite database support with Alembic for migrations.
- Implemented FastAPI for HTTP API to manage duties.
- Updated configuration to include database URL and HTTP port.
- Created entrypoint script for Docker to handle migrations and permissions.
- Expanded command handlers to register users and display duties.
- Developed a web application for calendar display of duties.
- Included necessary Pydantic schemas and SQLAlchemy models for data handling.
- Updated requirements.txt to include new dependencies for FastAPI and SQLAlchemy.
2026-02-17 12:51:01 +03:00

12 lines
380 B
Bash

#!/bin/sh
set -e
# 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 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 "$@"