Refactor Docker setup and migration scripts
- Updated Dockerfile to set permissions for the entrypoint script and defined the entrypoint for the container. - Consolidated Alembic migration history into a single initial migration file and removed obsolete revision files. - Added a new script to run Alembic migrations before starting the application. - Updated changelog to reflect changes in migration handling and Docker setup. - Enhanced pytest configuration for coverage reporting and excluded specific files from coverage calculations.
This commit is contained in:
@@ -102,10 +102,13 @@ RUN pip install --upgrade pip \
|
||||
|
||||
COPY . /app
|
||||
|
||||
RUN chown -R appuser:app /app
|
||||
RUN chown -R appuser:app /app \
|
||||
&& chmod +x /app/scripts/docker-entrypoint.sh
|
||||
|
||||
USER appuser
|
||||
|
||||
EXPOSE 8003
|
||||
|
||||
ENTRYPOINT ["/app/scripts/docker-entrypoint.sh"]
|
||||
|
||||
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8003", "--workers", "4"]
|
||||
|
||||
Reference in New Issue
Block a user