mirror of
https://github.com/solidtime-io/solidtime.git
synced 2026-08-15 03:32:15 +01:00
Added public build
This commit is contained in:
33
docker/prod/deployment/start-container
Normal file
33
docker/prod/deployment/start-container
Normal file
@@ -0,0 +1,33 @@
|
||||
#!/usr/bin/env bash
|
||||
set -e
|
||||
|
||||
container_mode=${CONTAINER_MODE:-http}
|
||||
octane_server=${OCTANE_SERVER}
|
||||
echo "Container mode: $container_mode"
|
||||
|
||||
initialStuff() {
|
||||
php artisan optimize:clear; \
|
||||
php artisan event:cache; \
|
||||
php artisan config:cache; \
|
||||
php artisan route:cache;
|
||||
}
|
||||
|
||||
if [ "$1" != "" ]; then
|
||||
exec "$@"
|
||||
elif [ ${container_mode} = "http" ]; then
|
||||
echo "Octane Server: $octane_server"
|
||||
initialStuff
|
||||
exec /usr/bin/supervisord -c /etc/supervisor/conf.d/supervisord.swoole.conf
|
||||
elif [ ${container_mode} = "horizon" ]; then
|
||||
initialStuff
|
||||
exec /usr/bin/supervisord -c /etc/supervisor/conf.d/supervisord.horizon.conf
|
||||
elif [ ${container_mode} = "scheduler" ]; then
|
||||
initialStuff
|
||||
exec /usr/bin/supervisord -c /etc/supervisor/conf.d/supervisord.scheduler.conf
|
||||
elif [ ${container_mode} = "worker" ]; then
|
||||
initialStuff
|
||||
exec /usr/bin/supervisord -c /etc/supervisor/conf.d/supervisord.worker.conf
|
||||
else
|
||||
echo "Container mode mismatched."
|
||||
exit 1
|
||||
fi
|
||||
Reference in New Issue
Block a user