-
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.
- Loading branch information
0 parents
commit df25273
Showing
6 changed files
with
731 additions
and
0 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 @@ | ||
todo-php-image.txt |
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,43 @@ | ||
FROM php:8.1.5-fpm-alpine3.15 | ||
# Informações | ||
LABEL maintainer="[email protected]" | ||
LABEL company="Convenia" | ||
|
||
# Host user id and group id,. | ||
# override this line to run whith a non 1000 user | ||
ARG UID=1000 | ||
ARG GID=1000 | ||
|
||
# Instalação do php ext installer (https://github.com/mlocati/docker-php-extension-installer) | ||
COPY --from=mlocati/php-extension-installer /usr/bin/install-php-extensions /usr/local/bin/ | ||
# Instalação de pacotes | ||
RUN IPE_GD_WITHOUTAVIF=1 install-php-extensions bcmath bz2 calendar exif gd gettext gmp opcache pcntl \ | ||
pdo_mysql sockets xsl zip \ | ||
igbinary-stable \ | ||
redis-stable \ | ||
mongodb-stable \ | ||
imagick-stable | ||
|
||
RUN apk add --no-cache --update supervisor=~4.2 nginx=~1.20 nginx-mod-http-headers-more openssh-client git | ||
|
||
# Instalação do composer | ||
COPY --from=composer:2 /usr/bin/composer /usr/local/bin/composer | ||
# Cria usuário e grupo app | ||
RUN addgroup -S -g $GID app && adduser -u $UID -G app -D app | ||
|
||
# Copy configuration files | ||
COPY ./docker/php-fpm.d/www.conf /usr/local/etc/php-fpm.d/www.conf | ||
COPY ./docker/supervisor/supervisord.conf /etc/supervisord.conf | ||
COPY ./docker/nginx/default.conf /etc/nginx/http.d/default.conf | ||
|
||
#Enable production configuration | ||
RUN mv "$PHP_INI_DIR/php.ini-production" "$PHP_INI_DIR/php.ini" | ||
|
||
ADD ./public /var/www/app/public | ||
RUN chown -R app:app /var/www/app | ||
|
||
WORKDIR /var/www | ||
|
||
EXPOSE 80 | ||
|
||
CMD [ "/usr/bin/supervisord", "-n", "-c", "/etc/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,44 @@ | ||
add_header X-Frame-Options "SAMEORIGIN"; | ||
add_header X-XSS-Protection "1; mode=block"; | ||
add_header X-Content-Type-Options "nosniff"; | ||
|
||
more_clear_headers Server server; | ||
add_header server convenia; | ||
|
||
server { | ||
listen 80 default_server; | ||
listen [::]:80 default_server ipv6only=on; | ||
|
||
root /var/www/app/public; | ||
index index.html index.php; | ||
|
||
client_max_body_size 100M; | ||
|
||
location ~ ^/(Dockerile|docker-compose.yml)/ { | ||
deny all; | ||
access_log off; | ||
log_not_found off; | ||
} | ||
|
||
location ~ /\.ht { | ||
deny all; | ||
access_log off; | ||
log_not_found off; | ||
} | ||
|
||
location ~ /\.git { | ||
deny all; | ||
} | ||
|
||
location / { | ||
try_files $uri $uri/ /index.php$is_args$args; | ||
} | ||
|
||
location ~\.php$ { | ||
try_files $uri /index.php =404; | ||
fastcgi_pass 127.0.0.1:9000; | ||
fastcgi_index index.php; | ||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; | ||
include fastcgi_params; | ||
} | ||
} |
Oops, something went wrong.