moved container cwd to ~/src/photoassistant so that gunicorn can react to src code changes, also forced logs to docker logs
This commit is contained in:
@@ -2,10 +2,12 @@
|
|||||||
|
|
||||||
sudo -u pauser ENV=${ENV} python3 -u pa_job_manager.py &> /var/log/pa_job_manager.out &
|
sudo -u pauser ENV=${ENV} python3 -u pa_job_manager.py &> /var/log/pa_job_manager.out &
|
||||||
if [ "$ENV" == "production" ]; then
|
if [ "$ENV" == "production" ]; then
|
||||||
# su pauser -g pauser -c 'ENV="production" python3 -u /code/pa_job_manager.py' &> /var/log/pa_job_manager.out &
|
|
||||||
sudo -u pauser gunicorn --bind=0.0.0.0:80 --workers=4 --threads=16 main:app --env ENV="production" --error-logfile gunicorn.error.log --access-logfile gunicorn.log --capture-output
|
sudo -u pauser gunicorn --bind=0.0.0.0:80 --workers=4 --threads=16 main:app --env ENV="production" --error-logfile gunicorn.error.log --access-logfile gunicorn.log --capture-output
|
||||||
elif [ "$ENV" == "container" ]; then
|
elif [ "$ENV" == "container" ]; then
|
||||||
sudo -u pauser gunicorn --bind=0.0.0.0:80 --workers=1 --threads=1 main:app --env ENV="container" --reload --capture-output
|
# move into src tree so padev responds to code changes
|
||||||
|
cd /home/ddp/src/photoassistant
|
||||||
|
# push container logs/errors to stdout so docker logs works
|
||||||
|
sudo -u pauser gunicorn --bind=0.0.0.0:80 --workers=1 --threads=1 main:app --env ENV="container" --reload --capture-output --log-file - --error-logfile -
|
||||||
else
|
else
|
||||||
echo "Not sure which ENV ($ENV) we are running, set up for DEV and dont run job manager (jic)"
|
echo "Not sure which ENV ($ENV) we are running, set up for DEV and dont run job manager (jic)"
|
||||||
sudo -u pauser gunicorn --bind=0.0.0.0:80 --workers=1 --threads=1 main:app --env ENV="development" --error-logfile gunicorn.error.log --access-logfile gunicorn.log --capture-output --enable-stdio-inheritance --reload
|
sudo -u pauser gunicorn --bind=0.0.0.0:80 --workers=1 --threads=1 main:app --env ENV="development" --error-logfile gunicorn.error.log --access-logfile gunicorn.log --capture-output --enable-stdio-inheritance --reload
|
||||||
|
|||||||
Reference in New Issue
Block a user