Docker container changes

This commit is contained in:
DomySh
2022-06-12 18:50:57 +02:00
parent 3139cbf288
commit e5e6ca6098
12 changed files with 54 additions and 296 deletions

27
backend/config/nginx.conf Executable file
View File

@@ -0,0 +1,27 @@
worker_processes 5; ## Default: 1
pid /var/run/nginx.pid;
user nobody nogroup;
events {
worker_connections 1024;
}
http{
server {
listen 80;
server_name _;
location / {
include proxy_params;
proxy_pass http://frontend:3000/;
}
location /api/ {
include proxy_params;
proxy_pass http://127.0.0.1:8080;
}
}
}

31
backend/config/supervisord.conf Executable file
View File

@@ -0,0 +1,31 @@
[supervisord]
logfile = /dev/null
loglevel = info
user = root
pidfile = /var/run/supervisord.pid
nodaemon = true
[program:nginx]
command=/usr/sbin/nginx -g "daemon off;"
autostart=true
autorestart=true
user = root
startretries=5
numprocs=1
startsecs=0
process_name=%(program_name)s_%(process_num)02d
stderr_logfile=/var/log/supervisor/%(program_name)s_stderr.log
stderr_logfile_maxbytes=10MB
stdout_logfile=/var/log/supervisor/%(program_name)s_stdout.log
stdout_logfile_maxbytes=10MB
[program:backend]
directory=/execute
user = nobody
command=python3 app.py
stdout_logfile="syslog"
stderr_logfile="syslog"
startsecs=10
stopsignal=QUIT
stopasgroup=true
killasgroup=true