InfluxOW/laravel_ddd_ecommerce

View on GitHub
docker/php/start-container

Summary

Maintainability
Test Coverage
#!/usr/bin/env bash

if [ ! -z "$WWWUSER" ]; then
    usermod -u $WWWUSER sail
fi

if [ ! -d /.composer ]; then
    mkdir /.composer
fi

chmod -R ugo+rw /.composer

if [ ! -d /home/sail/.config ]; then
    mkdir -p /home/sail/.config
fi

chmod -R ugo+rw /home/sail/.config

chmod 0644 /etc/cron.d/crontab && crontab /etc/cron.d/crontab

if [ $# -gt 0 ]; then
    if [ "$1" == "--no-supervisor" ]; then
        /usr/bin/supervisord -c /etc/supervisor/conf.d/supervisord.empty.conf
    else
        exec gosu $WWWUSER "$@"
    fi
else
    /usr/bin/supervisord -c /etc/supervisor/conf.d/supervisord.conf
fi