Added: Process id to log.

Added: Max workers to all .envs
Added: Leardall service
Added: beacon redis tunnel
This commit is contained in:
Amritanshu Agrawal 2022-04-16 17:28:00 +05:30
parent 1a8992c296
commit a213c1a0b5
6 changed files with 37 additions and 3 deletions

View File

@ -38,16 +38,16 @@ formatter=access
args=(sys.stdout, )
[formatter_generic]
format=%(asctime)s [%(name)s %(levelname)s] %(message)s
format=%(asctime)s [%(name)s %(levelname)s %(process)d] %(message)s
datefmt=%Y-%m-%d %H:%M:%S %Z
class=logging.Formatter
[formatter_error]
format=%(asctime)s [%(name)s %(levelname)s] %(message)s | %(funcName)s() | %(pathname)s L%(lineno)-4d
format=%(asctime)s [%(name)s %(levelname)s %(process)d] %(message)s | %(funcName)s() | %(pathname)s L%(lineno)-4d
datefmt=%Y-%m-%d %H:%M:%S %Z
class=logging.Formatter
[formatter_access]
format=%(asctime)s [%(name)s %(levelname)s] %(message)s
format=%(asctime)s [%(name)s %(levelname)s %(process)d] %(message)s
datefmt=%Y-%m-%d %H:%M:%S %Z
class=logging.Formatter

View File

@ -0,0 +1,15 @@
[Unit]
Description=Keep ssh tunnel to specified remote host open
After=network.target
[Service]
User=pi
ExecStart=/usr/bin/ssh -NT -o ServerAliveInterval=60 -o ExitOnForwardFailure=yes -o ServerAliveCountMax=3 -o StrictHostKeyChecking=no -i /home/pi/.ssh/id_rsa -L 6379:localhost:6379 tanshu@beacon.tanshu.com
# Restart every >2 seconds to avoid StartLimitInterval failure
RestartSec=5
Restart=always
[Install]
WantedBy=multi-user.target

View File

@ -5,6 +5,7 @@ DEBUG=false
SQLALCHEMY_DATABASE_URI=postgresql://postgres:123456@db:5432/pettychd
MODULE_NAME=barker.main
PROJECT_NAME=barker
MAX_WORKERS=4
REDIS_HOST=redis
REDIS_PORT=6379
SECRET_KEY=d9e4facec94d7e0bf3d63ca03b1d78d834b158627b6593274f7fe27f6aed6db4

View File

@ -0,0 +1,16 @@
[Unit]
Description=Reverse SSH connection
After=network.target
[Service]
Type=simple
User=pi
ExecStart=/usr/bin/ssh -NTg -o ServerAliveInterval=60 -o ExitOnForwardFailure=yes -o ServerAliveCountMax=3 -o StrictHostKeyChecking=no -i /home/pi/.ssh/id_rsa -R {{ ssh_port }}:localhost:22 tanshu@beacon.tanshu.com
# Restart every >2 seconds to avoid StartLimitInterval failure
Restart=always
RestartSec=5s
[Install]
WantedBy=default.target

View File

@ -5,6 +5,7 @@ DEBUG=false
SQLALCHEMY_DATABASE_URI=postgresql://postgres:123456@db:5432/pettymhl
MODULE_NAME=barker.main
PROJECT_NAME=barker
MAX_WORKERS=4
REDIS_HOST=redis
REDIS_PORT=6379
SECRET_KEY=8b7f704ad1bbee3caa683a57440a6a371937fe5f64a7712a6a15bf3165c3c598

View File

@ -5,6 +5,7 @@ DEBUG=false
SQLALCHEMY_DATABASE_URI=postgresql://postgres:123456@db:5432/pettypkl
MODULE_NAME=barker.main
PROJECT_NAME=barker
MAX_WORKERS=4
REDIS_HOST=redis
REDIS_PORT=6379
SECRET_KEY=bd6e5dee0f3b8a6f0db50f7aa08e91d55b2ae5ab6df126defa37e80602481002