diff --git a/.env b/.env index 1d44286e25..e02c4f8613 100644 --- a/.env +++ b/.env @@ -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 @@ -43,3 +43,4 @@ SENTRY_DSN= # Configure these with your own Docker registry images DOCKER_IMAGE_BACKEND=backend DOCKER_IMAGE_FRONTEND=frontend + diff --git a/.github/workflows/add-to-project.yml b/.github/workflows/add-to-project.yml deleted file mode 100644 index dccea83f35..0000000000 --- a/.github/workflows/add-to-project.yml +++ /dev/null @@ -1,18 +0,0 @@ -name: Add to Project - -on: - pull_request_target: - issues: - types: - - opened - - reopened - -jobs: - add-to-project: - name: Add to project - runs-on: ubuntu-latest - steps: - - uses: actions/add-to-project@v1.0.2 - with: - project-url: https://github.com/orgs/fastapi/projects/2 - github-token: ${{ secrets.PROJECTS_TOKEN }} diff --git a/backend/app/core/db.py b/backend/app/core/db.py index ba991fb36d..e0c79c49b6 100644 --- a/backend/app/core/db.py +++ b/backend/app/core/db.py @@ -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 @@ -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) diff --git a/backend/scripts/prestart.sh b/backend/scripts/prestart.sh index 1b395d513f..d59ed71e9f 100644 --- a/backend/scripts/prestart.sh +++ b/backend/scripts/prestart.sh @@ -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 diff --git a/docker-compose.yml b/docker-compose.yml index b1aa17ed43..f9f147a4d9 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -11,6 +11,8 @@ services: timeout: 10s volumes: - app-db-data:/var/lib/postgresql/data/pgdata + ports: + - ${POSTGRES_PORT}:5432 env_file: - .env environment: