-
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.
Browse files
Browse the repository at this point in the history
- Loading branch information
Showing
54 changed files
with
662 additions
and
1,758 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
daemon off; | ||
|
||
user nginx; | ||
worker_processes auto; | ||
|
||
error_log /var/log/nginx/error.log notice; | ||
pid /var/run/nginx.pid; | ||
|
||
events { | ||
worker_connections 1024; | ||
} | ||
|
||
http { | ||
include /etc/nginx/mime.types; | ||
default_type application/octet-stream; | ||
|
||
log_format main '$remote_addr - $remote_user [$time_local] "$request" ' | ||
'$status $body_bytes_sent "$http_referer" ' | ||
'"$http_user_agent" "$http_x_forwarded_for"'; | ||
|
||
access_log /var/log/nginx/access.log main; | ||
sendfile on; | ||
keepalive_timeout 65; | ||
|
||
server { | ||
listen 80 default; | ||
server_name keating-nginx; | ||
|
||
access_log /dev/stdout; | ||
error_log /dev/stderr; | ||
|
||
root /application/public; | ||
index index.php; | ||
|
||
if (!-e $request_filename) { | ||
rewrite ^.*$ /index.php last; | ||
} | ||
location ~ \.php$ { | ||
fastcgi_pass unix:/run/php-fpm.sock; | ||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; | ||
include fastcgi_params; | ||
} | ||
} | ||
} |
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,60 @@ | ||
FROM composer/composer:2.6.2-bin as composer-bin | ||
|
||
FROM php:8.2.10-fpm-bullseye | ||
|
||
COPY --from=composer-bin ./composer /usr/bin/composer | ||
|
||
ARG USER_NAME=host-user | ||
ARG USER_ID=1000 | ||
ARG PHP_FPM_GROUP=www-data | ||
|
||
RUN adduser \ | ||
--disabled-password \ | ||
--uid ${USER_ID} \ | ||
${USER_NAME} \ | ||
&& usermod \ | ||
--append \ | ||
--groups \ | ||
${PHP_FPM_GROUP} \ | ||
${USER_NAME} | ||
|
||
# Use the default development configuration | ||
RUN mv "${PHP_INI_DIR}/php.ini-development" "${PHP_INI_DIR}/php.ini" | ||
|
||
# For other versions check: http://nginx.org/packages/mainline/debian/pool/nginx/n/nginx/ | ||
ARG NGINX_VERSION="1.25.2-1~bullseye" | ||
ARG PHPREDIS_VERSION=6.0.0 | ||
|
||
RUN apt-get update \ | ||
&& apt-get install --assume-yes gpg \ | ||
&& curl https://nginx.org/keys/nginx_signing.key | gpg --dearmour --output /etc/apt/trusted.gpg.d/apt.nginx.org.gpg > /dev/null \ | ||
&& echo "deb https://nginx.org/packages/mainline/debian bullseye nginx" | tee /etc/apt/sources.list.d/nginx.list \ | ||
&& apt-get update && apt-get install --assume-yes \ | ||
nginx=${NGINX_VERSION} \ | ||
libzip-dev \ | ||
libpq-dev \ | ||
supervisor \ | ||
cron \ | ||
&& pecl install redis-${PHPREDIS_VERSION} \ | ||
&& docker-php-ext-install \ | ||
zip \ | ||
pdo_pgsql \ | ||
sockets \ | ||
pcntl \ | ||
&& docker-php-ext-enable \ | ||
pcntl \ | ||
redis | ||
|
||
ARG XDEBUG_VERSION=3.2.1 | ||
ARG INSTALL_XDEBUG=true | ||
|
||
RUN if [ ${INSTALL_XDEBUG} = true ]; then \ | ||
pecl install xdebug-${XDEBUG_VERSION} \ | ||
&& docker-php-ext-enable xdebug \ | ||
;fi | ||
|
||
COPY ./entrypoint.sh /entrypoint.sh | ||
|
||
WORKDIR /application | ||
|
||
ENTRYPOINT ["/entrypoint.sh"] |
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,12 @@ | ||
#!/bin/bash | ||
|
||
# -e is for "automatic error detection", tell shell to abort any time an error occurred | ||
set -e | ||
|
||
# bash is not responding to the sigterm and container always have 10 second timeout (when stop/restart) | ||
# exec is related with | ||
# https://docs.docker.com/compose/faq/#why-do-my-services-take-10-seconds-to-recreate-or-stop | ||
# https://github.com/moby/moby/issues/3766 | ||
# https://unix.stackexchange.com/a/196053 | ||
|
||
exec supervisord --configuration /etc/supervisor/custom-supervisord.conf |
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,8 @@ | ||
[global] | ||
daemonize = no | ||
|
||
[www] | ||
listen = /run/php-fpm.sock | ||
listen.owner = nginx | ||
|
||
user = host-user |
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 |
---|---|---|
@@ -1,4 +1,8 @@ | ||
xdebug.mode=develop,debug | ||
[PHP] | ||
memory_limit = 256M | ||
|
||
[xdebug] | ||
xdebug.mode=develop,debug,coverage | ||
xdebug.client_host=host.docker.internal | ||
xdebug.start_with_request=yes | ||
xdebug.client_port=9003 |
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,22 @@ | ||
; For more information on the config file, please see: | ||
; http://supervisord.org/configuration.html | ||
|
||
[supervisord] | ||
logfile = /var/log/supervisor/supervisord.log | ||
pidfile = /var/run/supervisord.pid | ||
user = root | ||
nodaemon = true | ||
|
||
[program:nginx] | ||
command=nginx | ||
stdout_logfile = /dev/stdout | ||
stdout_logfile_maxbytes = 0 | ||
stderr_logfile = /dev/stderr | ||
stderr_logfile_maxbytes = 0 | ||
|
||
[program:php-fpm] | ||
command = php-fpm | ||
stdout_logfile = /dev/stdout | ||
stdout_logfile_maxbytes = 0 | ||
stderr_logfile = /dev/stderr | ||
stderr_logfile_maxbytes = 0 |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.