-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Combine octane and nginx containers to deploy on Cloud Run
- Loading branch information
1 parent
e94a220
commit 4853eb1
Showing
16 changed files
with
479 additions
and
294 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
FROM southamerica-east1-docker.pkg.dev/codelab92/php/8.3-swoole:latest | ||
|
||
ARG APP_ENV=production | ||
ENV APP_ENV=${APP_ENV} | ||
|
||
WORKDIR /var/www/gamewatch | ||
|
||
COPY . /var/www/gamewatch | ||
COPY ./docker/php "${PHP_INI_DIR}/conf.d/" | ||
COPY ./docker/supervisor /etc/supervisor/ | ||
COPY ./docker/nginx/default.conf /etc/nginx/conf.d/ | ||
|
||
RUN if [ "$APP_ENV" = "local" ]; then \ | ||
apt-get update && apt-get install -y nano npm; \ | ||
fi | ||
|
||
#RUN find /var/www/gamewatch -not -path "/var/www/gamewatch/vendor/*" -type f -exec chmod 644 {} \; \ | ||
# && find /var/www/gamewatch -type d -exec chmod 755 {} \; \ | ||
# && chown -R www-data:www-data /var/www/gamewatch \ | ||
# && chmod -R ug+rwx storage bootstrap/cache | ||
|
||
COPY ./docker/entrypoint.sh /usr/local/bin/entrypoint.sh | ||
RUN chmod +x /usr/local/bin/entrypoint.sh | ||
|
||
ENTRYPOINT ["entrypoint.sh"] |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
[program:nginx] | ||
command=/usr/sbin/nginx -g 'daemon off;' | ||
autostart=true | ||
autorestart=true | ||
stdout_logfile=/dev/stdout | ||
stdout_logfile_maxbytes = 0 | ||
stderr_logfile=/dev/stderr | ||
stderr_logfile_maxbytes = 0 | ||
exitcodes=0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
[program:octane-dev] | ||
command=php artisan octane:swoole --watch | ||
autostart=true | ||
autorestart=true | ||
stdout_logfile=/dev/stdout | ||
stdout_logfile_maxbytes = 0 | ||
stderr_logfile=/dev/stderr | ||
stderr_logfile_maxbytes = 0 | ||
exitcodes=0 | ||
priority=10 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
[program:octane-prod] | ||
command=php artisan octane:swoole --workers=4 --task-workers=4 | ||
autostart=true | ||
autorestart=true | ||
stdout_logfile=/dev/stdout | ||
stdout_logfile_maxbytes = 0 | ||
stderr_logfile=/dev/stderr | ||
stderr_logfile_maxbytes = 0 | ||
exitcodes=0 | ||
priority=10 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
[unix_http_server] | ||
file=/var/run/supervisor.sock | ||
chmod=0700 | ||
chown=www-data:www-data | ||
|
||
[supervisord] | ||
logfile=/dev/null | ||
logfile_maxbytes=0 | ||
loglevel=info | ||
pidfile=/var/run/supervisord.pid | ||
nodaemon=true | ||
minfds=1024 | ||
minprocs=200 | ||
user=root | ||
|
||
[rpcinterface:supervisor] | ||
supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface | ||
|
||
[supervisorctl] | ||
serverurl=unix:///var/run/supervisor.sock | ||
|
||
[include] | ||
files = /etc/supervisor/conf.d/*.conf |
Oops, something went wrong.