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

ci: Provide production deployment via gunicorn #22

Merged
merged 1 commit into from
Jan 8, 2025
Merged
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
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@ RUN pip install --no-cache-dir -r requirements.txt
# Quellcode in den Container kopieren
COPY . .

# Flask Server starten
CMD ["flask", "run", "--host=0.0.0.0", "--port=8003"]
# Gunicorn Server starten
CMD ["gunicorn", "-w", "4", "-b", "0.0.0.0:8003", "app:app"]
3 changes: 0 additions & 3 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,5 @@ services:
- "8003:8003"
volumes:
- ./app/config.py:/app/app/config.py:ro # Die lokale config.py in den Container mounten
environment:
FLASK_ENV: development
FLASK_APP: app # Setzt das Flask App-Modul
restart: always

2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
flask
gunicorn
gunicorn==23.0.0
Flask-WTF
lxml
email_validator
Expand Down
Loading