feat: implement user data schema and API endpoints
- Add Alembic migration setup with async configuration - Create 16 user data models (users, decks, cards, replays, etc.) - Implement comprehensive API endpoints with JWT auth - Add replay, card collection, group, network, preferences, and activity log routers - Include API documentation and migration test plan - Update Dockerfile to run migrations on startup
This commit is contained in:
+7
-2
@@ -29,11 +29,15 @@ ENV PATH=/app/.local/bin:$PATH
|
||||
|
||||
RUN groupadd -r appuser && useradd -r -g appuser -d /app -s /sbin/nologin appuser
|
||||
|
||||
RUN mkdir -p /app/data /app/uploads /app/logs /app/scripts && chown -R appuser:appuser /app
|
||||
RUN mkdir -p /app/data /app/uploads /app/logs /app/scripts /app/alembic/versions && chown -R appuser:appuser /app
|
||||
|
||||
# Copy application code
|
||||
COPY --chown=appuser:appuser app/ ./app/
|
||||
|
||||
# Copy Alembic configuration
|
||||
COPY --chown=appuser:appuser alembic.ini ./
|
||||
COPY --chown=appuser:appuser alembic/ ./alembic/
|
||||
|
||||
# Copy interaction pipeline scripts
|
||||
COPY --chown=appuser:appuser scripts/ ./scripts/
|
||||
RUN chmod +x /app/scripts/*.py
|
||||
@@ -52,4 +56,5 @@ USER appuser
|
||||
|
||||
EXPOSE 8000
|
||||
|
||||
CMD ["python", "-m", "uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8000"]
|
||||
# Run migrations before starting the app
|
||||
CMD ["sh", "-c", "python -m alembic upgrade head && python -m uvicorn app.main:app --host 0.0.0.0 --port 8000"]
|
||||
|
||||
Reference in New Issue
Block a user