This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: '3' | |
services: | |
testdb_postgres: | |
image: postgres:12 | |
restart: always | |
ports: | |
- 5432:5432 | |
environment: | |
POSTGRES_USER: user | |
POSTGRES_PASSWORD: password |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
PROCESSOR_COUNT=$(nproc) | |
THREAD_COUNT=2 | |
uwsgi --http :9808 --plugin python2 --wsgi-file app.py --processes "$PROCESSOR_COUNT" --threads "$THREAD_COUNT" --disable-logging |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
PROCESSOR_COUNT=$(nproc) | |
THREAD_COUNT=2 | |
USER=www-data | |
GROUP=www-data | |
mod_wsgi-express start-server app.py --port 9808 --processes "$PROCESSOR_COUNT" --threads "$THREAD_COUNT" --user "$USER" --group "$GROUP" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import meinheld | |
from app import application | |
meinheld.listen(("0.0.0.0", 9808)) | |
meinheld.run(application) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
PROCESSOR_COUNT=$(nproc) | |
GUNICORN_WORKER_COUNT=$(( PROCESSOR_COUNT * 2 + 1 )) | |
gunicorn -w ${GUNICORN_WORKER_COUNT} -b 0.0.0.0:9808 app:application |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import socket | |
from cherrypy import wsgiserver | |
from app import application | |
server = wsgiserver.CherryPyWSGIServer( | |
bind_addr=('0.0.0.0', 9808), | |
wsgi_app=application, | |
request_queue_size=500, | |
server_name=socket.gethostname() | |
) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import bjoern | |
from app import application | |
bjoern.run( | |
wsgi_app=application, | |
host='0.0.0.0', | |
port=9808, | |
reuse_port=True | |
) |