Skip to content

Commit

Permalink
Update dockerfile
Browse files Browse the repository at this point in the history
switch from test server
  • Loading branch information
LucifersCircle committed Dec 7, 2024
1 parent 24f6512 commit 6aa01de
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,12 @@ COPY . .

RUN chown -R appuser:appuser /usr/src/app

RUN pip install --no-cache-dir flask requests cryptography
RUN pip install --no-cache-dir flask requests cryptography gunicorn

USER appuser

# Use an environment variable to decide which script to run
ENV APP_SCRIPT="app.py"
CMD ["sh", "-c", "python $APP_SCRIPT"]
# Environment variable to specify the script for the app
ENV APP_SCRIPT="app:app" # app is the filename, app is the Flask instance

CMD ["gunicorn", "-w", "4", "-b", "0.0.0.0:5000", "$APP_SCRIPT"]

0 comments on commit 6aa01de

Please sign in to comment.