Skip to content

Commit

Permalink
application startup fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
nuwan-samarasinghe committed Aug 14, 2024
1 parent 42eb209 commit 9ab8111
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 6 deletions.
17 changes: 12 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,22 @@
###############################################################################

FROM python:3.10-bullseye as fab-dev

ARG USE_DEV_REQUIREMENTS

WORKDIR /app

COPY . .
RUN apt-get update && apt-get install -y postgresql-client
COPY requirements.txt requirements.txt
COPY requirements-dev.txt requirements-dev.txt

RUN python3 -m pip install --upgrade pip && pip install pip-tools && pip install -r requirements.txt
RUN python3 -m pip install -r requirements-dev.txt
RUN if "$USE_DEV_REQUIREMENTS"; then \
echo "Installing development dependencies..." && \
python3 -m pip install --upgrade pip && pip install -r requirements-dev.txt; \
else \
echo "Installing production dependencies..." && \
python3 -m pip install --upgrade pip && pip install -r requirements.txt; \
fi

COPY . .

EXPOSE 8080

Expand Down
1 change: 1 addition & 0 deletions app.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
import app # noqa
1 change: 1 addition & 0 deletions app/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from app.create_app import app # noqa
2 changes: 1 addition & 1 deletion app/app.py → app/create_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,4 +59,4 @@ def create_app() -> Flask:
return flask_app


app = create_app()
app = create_app()

0 comments on commit 9ab8111

Please sign in to comment.