feat: add initial supervisor setup

This commit is contained in:
Karol Sójko
2023-02-03 11:26:06 +01:00
parent 306f6edd4e
commit 55de4319ed
6 changed files with 61 additions and 2 deletions

11
docker/docker-entrypoint.sh Executable file
View File

@@ -0,0 +1,11 @@
#!/bin/bash
# Setup environment variables
printenv | grep API_GATEWAY_ | sed 's/API_GATEWAY_//g' > /opt/server/packages/api-gateway/.env
# Run supervisor
supervisord -c /etc/supervisord.conf
exec "$@"

11
docker/supervisord.conf Normal file
View File

@@ -0,0 +1,11 @@
[supervisord]
nodaemon=true
logfile=/tmp/supervisord.log
[program:api-gateway]
directory=/opt/server
command=yarn start:api-gateway
autostart=true
autorestart=true
stdout_logfile=/var/lib/server/logs/api-gateway.log
stderr_logfile=/var/lib/server/logs/api-gateway.err