Skip to content
Closed
Show file tree
Hide file tree
Changes from all 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
3 changes: 2 additions & 1 deletion .env
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ SMTP_SSL=False
SMTP_PORT=587

# Postgres
POSTGRES_SERVER=localhost
POSTGRES_SERVER=db
POSTGRES_PORT=5432
POSTGRES_DB=app
POSTGRES_USER=postgres
Expand All @@ -43,3 +43,4 @@ SENTRY_DSN=
# Configure these with your own Docker registry images
DOCKER_IMAGE_BACKEND=backend
DOCKER_IMAGE_FRONTEND=frontend

18 changes: 0 additions & 18 deletions .github/workflows/add-to-project.yml

This file was deleted.

4 changes: 2 additions & 2 deletions backend/app/core/db.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from sqlmodel import Session, create_engine, select
from sqlmodel import Session, SQLModel, create_engine, select

from app import crud
from app.core.config import settings
Expand All @@ -19,7 +19,7 @@ def init_db(session: Session) -> None:
# from sqlmodel import SQLModel

# This works because the models are already imported and registered from app.models
# SQLModel.metadata.create_all(engine)
SQLModel.metadata.create_all(engine)

user = session.exec(
select(User).where(User.email == settings.FIRST_SUPERUSER)
Expand Down
2 changes: 1 addition & 1 deletion backend/scripts/prestart.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ set -x
python app/backend_pre_start.py

# Run migrations
alembic upgrade head
# alembic upgrade head

# Create initial data in DB
python app/initial_data.py
2 changes: 2 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ services:
timeout: 10s
volumes:
- app-db-data:/var/lib/postgresql/data/pgdata
ports:
- ${POSTGRES_PORT}:5432
env_file:
- .env
environment:
Expand Down