Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🔧 Use plain base official Python Docker image #1351

Merged
merged 7 commits into from
Sep 22, 2024
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions backend/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM tiangolo/uvicorn-gunicorn-fastapi:python3.10
FROM python:3.10

WORKDIR /app/

Expand All @@ -21,8 +21,6 @@ COPY ./scripts/ /app/

COPY ./alembic.ini /app/

COPY ./prestart.sh /app/

COPY ./tests-start.sh /app/

COPY ./app /app/app
Expand Down
2 changes: 1 addition & 1 deletion backend/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ If you don't want to use migrations at all, uncomment the lines in the file at `
SQLModel.metadata.create_all(engine)
```

and comment the line in the file `prestart.sh` that contains:
and comment the line in the file `scripts/prestart.sh` that contains:

```console
$ alembic upgrade head
Expand Down
7 changes: 5 additions & 2 deletions backend/prestart.sh → backend/scripts/prestart.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
#! /usr/bin/env bash

set -e
set -x

# Let the DB start
python /app/app/backend_pre_start.py
python app/backend_pre_start.py

# Run migrations
alembic upgrade head

# Create initial data in DB
python /app/app/initial_data.py
python app/initial_data.py