Updates to make Docker Compose better
This commit is contained in:
@@ -27,7 +27,7 @@ class Settings(BaseSettings):
|
|||||||
DB['password'] = os.getenv('AE_DB_PASSWORD', None) #
|
DB['password'] = os.getenv('AE_DB_PASSWORD', None) #
|
||||||
SQLALCHEMY_DB_URI = 'mysql://'+DB['username']+':'+DB['password']+'@'+DB['server']+'/'+DB['name']
|
SQLALCHEMY_DB_URI = 'mysql://'+DB['username']+':'+DB['password']+'@'+DB['server']+'/'+DB['name']
|
||||||
|
|
||||||
DB['wait_timeout'] = int(os.getenv('AE_DB_WAIT_TIMEOUT', 1800)) # default = 28800; Time (seconds) that the server waits for a connection to become active before closing it.
|
# DB['wait_timeout'] = int(os.getenv('AE_DB_WAIT_TIMEOUT', 1800)) # Not used yet! default = 28800; Time (seconds) that the server waits for a connection to become active before closing it.
|
||||||
DB['connect_timeout'] = int(os.getenv('AE_DB_CONNECTION_TIMEOUT', 20)) # default = 10; Time (seconds) that the server waits for a connection to become active before closing it.
|
DB['connect_timeout'] = int(os.getenv('AE_DB_CONNECTION_TIMEOUT', 20)) # default = 10; Time (seconds) that the server waits for a connection to become active before closing it.
|
||||||
DB['pool_recycle'] = int(os.getenv('AE_DB_POOL_RECYCLE', 1800)) # default = ?; Related to SQLAlchemy
|
DB['pool_recycle'] = int(os.getenv('AE_DB_POOL_RECYCLE', 1800)) # default = ?; Related to SQLAlchemy
|
||||||
|
|
||||||
@@ -66,19 +66,19 @@ class Settings(BaseSettings):
|
|||||||
ORIGINS = [
|
ORIGINS = [
|
||||||
'https://oneskyit.com',
|
'https://oneskyit.com',
|
||||||
# 'http://app-local.oneskyit.com',
|
# 'http://app-local.oneskyit.com',
|
||||||
'http://192.168.32.20:3000',
|
# 'http://192.168.32.20:3000',
|
||||||
'http://192.168.32.20:8080',
|
# 'http://192.168.32.20:8080',
|
||||||
|
|
||||||
'http://localhost',
|
# 'http://localhost',
|
||||||
'http://localhost:3000',
|
# 'http://localhost:3000',
|
||||||
# 'http://localhost:5000',
|
# 'http://localhost:5000',
|
||||||
'http://localhost:7800',
|
# 'http://localhost:7800',
|
||||||
# 'http://localhost:8080',
|
# 'http://localhost:8080',
|
||||||
# 'http://localhost:8888',
|
# 'http://localhost:8888',
|
||||||
|
|
||||||
# 'http://fastapi.localhost',
|
# 'http://fastapi.localhost',
|
||||||
|
|
||||||
'http://svelte.oneskyit.local:5555',
|
# 'http://svelte.oneskyit.local:5555',
|
||||||
|
|
||||||
# 'http://connect.localhost:5000', # Using localhost
|
# 'http://connect.localhost:5000', # Using localhost
|
||||||
|
|
||||||
@@ -90,20 +90,4 @@ class Settings(BaseSettings):
|
|||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
# HTTP Status Dict List
|
|
||||||
HTTP_STATUS_LI = {}
|
|
||||||
# HTTP_STATUS_LI[200] = { 'name': 'OK', 'message': 'The request has succeeded.' }
|
|
||||||
# HTTP_STATUS_LI[400] = { 'name': 'Bad Request', 'message': 'The request could not be understood by the server due to malformed syntax. The client SHOULD NOT repeat the request without modifications.' }
|
|
||||||
# HTTP_STATUS_LI[401] = { 'name': 'Unauthorized', 'message': 'The server could not verify that you are authorized to access the URL requested. You either supplied the wrong credentials (e.g. a bad password), or your browser does not understand how to supply the credentials required.' }
|
|
||||||
# HTTP_STATUS_LI[402] = { 'name': '?Request Failed?', 'message': '??The parameters were valid but the request failed.??' }
|
|
||||||
# HTTP_STATUS_LI[403] = { 'name': 'Forbidden', 'message': 'The server understood the request, but is refusing to fulfill it. Authorization will not help and the request SHOULD NOT be repeated. If the request method was not HEAD and the server wishes to make public why the request has not been fulfilled, it SHOULD describe the reason for the refusal in the entity. If the server does not wish to make this information available to the client, the status code 404 (Not Found) can be used instead.' }
|
|
||||||
# HTTP_STATUS_LI[404] = { 'name': 'Not Found', 'message': 'The requested resource does not exist.' }
|
|
||||||
# HTTP_STATUS_LI[409] = { 'name': 'Conflict', 'message': 'The request conflicts with another request (perhaps due to using the same idempotent key).' }
|
|
||||||
# HTTP_STATUS_LI[429] = { 'name': 'Too Many Requests', 'message': 'Too many requests hit the API too quickly. We recommend an exponential backoff of your requests.' }
|
|
||||||
# HTTP_STATUS_LI[500] = { 'name': 'Internal Server Error', 'message': 'The server encountered an unexpected condition which prevented it from fulfilling the request.' }
|
|
||||||
# HTTP_STATUS_LI[501] = { 'name': 'Not Implemented', 'message': 'The server does not support the functionality required to fulfill the request. This is the appropriate response when the server does not recognize the request method and is not capable of supporting it for any resource.' }
|
|
||||||
# HTTP_STATUS_LI[502] = { 'name': 'Bad Gateway', 'message': 'The server, while acting as a gateway or proxy, received an invalid response from the upstream server it accessed in attempting to fulfill the request.' }
|
|
||||||
# HTTP_STATUS_LI[503] = { 'name': 'Service Unavailable', 'message': 'The server is currently unable to handle the request due to a temporary overloading or maintenance of the server. The implication is that this is a temporary condition which will be alleviated after some delay. If known, the length of the delay MAY be indicated in a Retry-After header. If no Retry-After is given, the client SHOULD handle the response as it would for a 500 response.' }
|
|
||||||
# HTTP_STATUS_LI[504] = { 'name': 'Gateway Timeout', 'message': 'The server, while acting as a gateway or proxy, did not receive a timely response from the upstream server specified by the URI (e.g. HTTP, FTP, LDAP) or some other auxiliary server (e.g. DNS) it needed to access in attempting to complete the request.' }
|
|
||||||
|
|
||||||
settings = Settings()
|
settings = Settings()
|
||||||
|
|||||||
@@ -23,8 +23,8 @@ wsgi_app = "app.main:app"
|
|||||||
|
|
||||||
# Setting a long timeout since some FastAPI API requests may take a while
|
# Setting a long timeout since some FastAPI API requests may take a while
|
||||||
timeout = 2100 # default 30; 1200 is NOT enough; worker process silent then kill and restart
|
timeout = 2100 # default 30; 1200 is NOT enough; worker process silent then kill and restart
|
||||||
graceful_timeout = 10 # default 30; timeout after restart signal
|
graceful_timeout = 20 # default 30; timeout after restart signal; tried 10 2023-07-11
|
||||||
keepalive = 30 # default 2; setting higher because behind load balancer (nginx)
|
keepalive = 30 # default 2; setting higher because behind load balancer (nginx); tried 10 2023-07-11
|
||||||
|
|
||||||
# Reload does not work correctly with UvicornWorker
|
# Reload does not work correctly with UvicornWorker
|
||||||
# https://github.com/benoitc/gunicorn/issues/2339
|
# https://github.com/benoitc/gunicorn/issues/2339
|
||||||
|
|||||||
@@ -1,9 +1,11 @@
|
|||||||
# aioredis # BAD! Not maintained!
|
# aioredis # BAD! Not maintained!
|
||||||
|
aiofiles
|
||||||
anyio
|
anyio
|
||||||
argon2-cffi
|
argon2-cffi
|
||||||
argon2-cffi-bindings
|
argon2-cffi-bindings
|
||||||
asgiref
|
asgiref
|
||||||
async-timeout
|
async-timeout
|
||||||
|
baize # added 2023-08-17
|
||||||
certifi
|
certifi
|
||||||
cffi
|
cffi
|
||||||
charset-normalizer
|
charset-normalizer
|
||||||
|
|||||||
@@ -19,6 +19,7 @@ server {
|
|||||||
dev-cmsc.oneskyit.com *.dev-cmsc.oneskyit.com
|
dev-cmsc.oneskyit.com *.dev-cmsc.oneskyit.com
|
||||||
dev-idaa.oneskyit.com *.dev-idaa.oneskyit.com
|
dev-idaa.oneskyit.com *.dev-idaa.oneskyit.com
|
||||||
dev-ishlt.oneskyit.com *.dev-ishlt.oneskyit.com
|
dev-ishlt.oneskyit.com *.dev-ishlt.oneskyit.com
|
||||||
|
dev-lci.oneskyit.com *.dev-lci.oneskyit.com
|
||||||
dev-ncsd.oneskyit.com *.dev-ncsd.oneskyit.com
|
dev-ncsd.oneskyit.com *.dev-ncsd.oneskyit.com
|
||||||
dev-npa.oneskyit.com *.dev-npa.oneskyit.com
|
dev-npa.oneskyit.com *.dev-npa.oneskyit.com
|
||||||
dev-rli.oneskyit.com *.dev-rli.oneskyit.com
|
dev-rli.oneskyit.com *.dev-rli.oneskyit.com
|
||||||
@@ -76,6 +77,7 @@ server {
|
|||||||
dev-cmsc.oneskyit.com *.dev-cmsc.oneskyit.com
|
dev-cmsc.oneskyit.com *.dev-cmsc.oneskyit.com
|
||||||
dev-idaa.oneskyit.com *.dev-idaa.oneskyit.com
|
dev-idaa.oneskyit.com *.dev-idaa.oneskyit.com
|
||||||
dev-ishlt.oneskyit.com *.dev-ishlt.oneskyit.com
|
dev-ishlt.oneskyit.com *.dev-ishlt.oneskyit.com
|
||||||
|
dev-lci.oneskyit.com *.dev-lci.oneskyit.com
|
||||||
dev-ncsd.oneskyit.com *.dev-ncsd.oneskyit.com
|
dev-ncsd.oneskyit.com *.dev-ncsd.oneskyit.com
|
||||||
dev-npa.oneskyit.com *.dev-npa.oneskyit.com
|
dev-npa.oneskyit.com *.dev-npa.oneskyit.com
|
||||||
dev-rli.oneskyit.com *.dev-rli.oneskyit.com
|
dev-rli.oneskyit.com *.dev-rli.oneskyit.com
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ services:
|
|||||||
# - NGINX_SERVER_NAMES="dev-idaa.oneskyit.com dev-ishlt.oneskyit.com"
|
# - NGINX_SERVER_NAMES="dev-idaa.oneskyit.com dev-ishlt.oneskyit.com"
|
||||||
# - AE_DOMAIN_LIST:'dev-aapor.oneskyit.com dev-businessgroup.oneskyt.com dev-cmsc.oneskyit.com dev-idaa.oneskyit.com dev-ishlt.oneskyit.com dev-ncsd.oneskyit.com dev-npa.oneskyit.com dev-rli.oneskyit.com'
|
# - AE_DOMAIN_LIST:'dev-aapor.oneskyit.com dev-businessgroup.oneskyt.com dev-cmsc.oneskyit.com dev-idaa.oneskyit.com dev-ishlt.oneskyit.com dev-ncsd.oneskyit.com dev-npa.oneskyit.com dev-rli.oneskyit.com'
|
||||||
# - NGINX_SERVER_NAMES="flask_gunicorn.localhost demo.localhost dev.localhost dev.oneskyit.com dev-app.oneskyit.com dev-connect.oneskyit.com *.dev-connect.oneskyit.com dev-demo.oneskyit.com *.dev-demo.oneskyit.com dev-aapor.oneskyit.com *.dev-aapor.oneskyit.com dev-businessgroup.oneskyt.com *.dev-businessgroup.oneskyt.com dev-cmsc.oneskyit.com *.dev-cmsc.oneskyit.com dev-idaa.oneskyit.com *.dev-idaa.oneskyit.com dev-ishlt.oneskyit.com *.dev-ishlt.oneskyit.com dev-ncsd.oneskyit.com *.dev-ncsd.oneskyit.com dev-npa.oneskyit.com *.dev-npa.oneskyit.com dev-rli.oneskyit.com *.dev-rli.oneskyit.com test-app.oneskyit.com"
|
# - NGINX_SERVER_NAMES="flask_gunicorn.localhost demo.localhost dev.localhost dev.oneskyit.com dev-app.oneskyit.com dev-connect.oneskyit.com *.dev-connect.oneskyit.com dev-demo.oneskyit.com *.dev-demo.oneskyit.com dev-aapor.oneskyit.com *.dev-aapor.oneskyit.com dev-businessgroup.oneskyt.com *.dev-businessgroup.oneskyt.com dev-cmsc.oneskyit.com *.dev-cmsc.oneskyit.com dev-idaa.oneskyit.com *.dev-idaa.oneskyit.com dev-ishlt.oneskyit.com *.dev-ishlt.oneskyit.com dev-ncsd.oneskyit.com *.dev-ncsd.oneskyit.com dev-npa.oneskyit.com *.dev-npa.oneskyit.com dev-rli.oneskyit.com *.dev-rli.oneskyit.com test-app.oneskyit.com"
|
||||||
- NGINX_SERVER_NAMES="flask_gunicorn.localhost demo.localhost dev.localhost dev.oneskyit.com dev-app.oneskyit.com dev-connect.oneskyit.com dev-demo.oneskyit.com dev-aacc.oneskyit.com dev-aapor.oneskyit.com dev-businessgroup.oneskyt.com dev-cmsc.oneskyit.com dev-idaa.oneskyit.com dev-ishlt.oneskyit.com dev-ncsd.oneskyit.com dev-npa.oneskyit.com dev-rli.oneskyit.com test-app.oneskyit.com"
|
- NGINX_SERVER_NAMES="flask_gunicorn.localhost demo.localhost dev.localhost dev.oneskyit.com dev-app.oneskyit.com dev-connect.oneskyit.com dev-demo.oneskyit.com dev-aacc.oneskyit.com dev-aapor.oneskyit.com dev-businessgroup.oneskyt.com dev-cmsc.oneskyit.com dev-idaa.oneskyit.com dev-ishlt.oneskyit.com dev-lci.oneskyit.com dev-ncsd.oneskyit.com dev-npa.oneskyit.com dev-rli.oneskyit.com test-app.oneskyit.com"
|
||||||
ports:
|
ports:
|
||||||
- "${OSIT_WEB_HTTP_PORT}:80"
|
- "${OSIT_WEB_HTTP_PORT}:80"
|
||||||
- "${OSIT_WEB_HTTPS_PORT}:443"
|
- "${OSIT_WEB_HTTPS_PORT}:443"
|
||||||
|
|||||||
@@ -1 +0,0 @@
|
|||||||
/mnt/data_drive/srv/data/osit_app/hosted_files_dev
|
|
||||||
Reference in New Issue
Block a user