Files
duty-teller/entrypoint.sh
Nikolay Tatarinov ec58739852 Refactor Alembic configuration and update Docker setup
- Removed the `alembic.ini` file and migrated its configuration to `pyproject.toml` under `[tool.alembic]`, enhancing project organization.
- Updated the `Dockerfile` to copy `pyproject.toml` instead of `alembic.ini`, ensuring the new configuration is utilized during the build process.
- Modified `entrypoint.sh` to use the new Alembic configuration from `pyproject.toml` for database migrations.
- Updated README documentation to reflect the new Alembic configuration and usage instructions.
2026-02-18 13:06:57 +03:00

12 lines
398 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 -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 "$@"