Skip to content

Commit

Permalink
Fixed Gunicorn
Browse files Browse the repository at this point in the history
  • Loading branch information
marshalmiller committed Apr 14, 2024
1 parent 037b7f1 commit 9cf5ce0
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Expand Up @@ -15,4 +15,4 @@ COPY . .
# CMD ["python", "app.py"]
CMD ["gunicorn", "--config", "gunicorn_config.py", "app:app"]
# Expose Port
EXPOSE 8080
EXPOSE 8000
2 changes: 1 addition & 1 deletion docker-compose.yml
Expand Up @@ -13,7 +13,7 @@ services:
- "worker"
restart: unless-stopped
ports:
- "8080:8080"
- "8000:8000"
environment:
- FLASK_APP=app
- APP_SECRET_KEY=change_me
Expand Down
2 changes: 1 addition & 1 deletion gunicorn_config.py
@@ -1,7 +1,7 @@
# gunicorn_config.py
import multiprocessing

bind = "127.0.0.1:8080" # bind the server to localhost at port 8000
bind = "0.0.0.0:8000" # bind the server to localhost at port 8000
workers = multiprocessing.cpu_count() * 2 + 1 # number of worker processes
# workers = 1 # number of worker processes
threads = 2 # number of threads per worker
Expand Down

0 comments on commit 9cf5ce0

Please sign in to comment.