mirror of
https://codeberg.org/angestoepselt/refund-form.git
synced 2025-05-24 14:46:16 +00:00
bump to alpine 3.18
This commit is contained in:
parent
196aab2ede
commit
ccf92540b8
2 changed files with 35 additions and 10 deletions
25
Dockerfile
25
Dockerfile
|
|
@ -2,6 +2,7 @@ ARG ALPINE_VERSION=3.18
|
||||||
FROM alpine:${ALPINE_VERSION}
|
FROM alpine:${ALPINE_VERSION}
|
||||||
LABEL Maintainer="Matthias Hemmerich matthias+code@mailbro.de"
|
LABEL Maintainer="Matthias Hemmerich matthias+code@mailbro.de"
|
||||||
LABEL Description="Forked from https://github.com/TrafeX/docker-php-nginx, Lightweight container with Nginx 1.20 & PHP 8.0 based on Alpine Linux."
|
LABEL Description="Forked from https://github.com/TrafeX/docker-php-nginx, Lightweight container with Nginx 1.20 & PHP 8.0 based on Alpine Linux."
|
||||||
|
|
||||||
# Setup document root
|
# Setup document root
|
||||||
WORKDIR /var/www/html
|
WORKDIR /var/www/html
|
||||||
|
|
||||||
|
|
@ -12,8 +13,8 @@ RUN apk update \
|
||||||
nginx \
|
nginx \
|
||||||
php82 \
|
php82 \
|
||||||
php82-fpm \
|
php82-fpm \
|
||||||
supervisor \
|
supervisor
|
||||||
php --version
|
|
||||||
# Configure nginx
|
# Configure nginx
|
||||||
COPY config/nginx.conf /etc/nginx/nginx.conf
|
COPY config/nginx.conf /etc/nginx/nginx.conf
|
||||||
|
|
||||||
|
|
@ -21,20 +22,24 @@ COPY config/nginx.conf /etc/nginx/nginx.conf
|
||||||
COPY config/fpm-pool.conf /etc/php82/php-fpm.d/www.conf
|
COPY config/fpm-pool.conf /etc/php82/php-fpm.d/www.conf
|
||||||
COPY config/php.ini /etc/php82/conf.d/custom.ini
|
COPY config/php.ini /etc/php82/conf.d/custom.ini
|
||||||
|
|
||||||
|
RUN mkdir /etc/supervisor.d \
|
||||||
|
&& \
|
||||||
|
chown -R nobody.nobody /var/www/html /run /var/lib/nginx /var/log/nginx
|
||||||
|
|
||||||
# Configure supervisord
|
# Configure supervisord
|
||||||
COPY config/supervisord.conf /etc/supervisor/conf.d/supervisord.conf
|
COPY config/supervisord.conf /etc/supervisor.d/supervisord.conf
|
||||||
|
|
||||||
# Make sure files/folders needed by the processes are accessable when they run under the nobody user
|
|
||||||
RUN chown -R nobody.nobody /var/www/html /run /var/lib/nginx /var/log/nginx
|
|
||||||
|
|
||||||
# Switch to use a non-root user from here on
|
|
||||||
USER nobody
|
|
||||||
|
|
||||||
# Add application
|
# Add application
|
||||||
COPY --chown=nobody app/ /var/www/html/
|
COPY --chown=nobody app/ /var/www/html/
|
||||||
|
|
||||||
|
# Switch to use a non-root user from here on
|
||||||
|
USER nobody
|
||||||
|
|
||||||
# Expose the port nginx is reachable on
|
# Expose the port nginx is reachable on
|
||||||
EXPOSE 80
|
EXPOSE 80
|
||||||
|
|
||||||
# Let supervisord start nginx & php-fpm
|
# Let supervisord start nginx & php-fpm
|
||||||
CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/conf.d/supervisord.conf"]
|
CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor.d/supervisord.conf"]
|
||||||
|
|
||||||
|
# Configure a healthcheck to validate that everything is up & running
|
||||||
|
HEALTHCHECK --timeout=10s CMD curl --silent --fail http://127.0.0.1:80/fpm-ping
|
||||||
20
docker-compose.yml
Normal file
20
docker-compose.yml
Normal file
|
|
@ -0,0 +1,20 @@
|
||||||
|
---
|
||||||
|
version: "3"
|
||||||
|
|
||||||
|
services:
|
||||||
|
refund-form:
|
||||||
|
image: codeberg.org/angestoepselt/refund-form:latest
|
||||||
|
container_name: refund-form
|
||||||
|
restart: unless-stopped
|
||||||
|
labels:
|
||||||
|
- "traefik.enable=true"
|
||||||
|
- "traefik.docker.network=proxy"
|
||||||
|
- "traefik.http.routers.refund-secure.rule=Host(`auslagen.z31.it`)"
|
||||||
|
- "traefik.http.routers.refund-secure.entrypoints=websecure"
|
||||||
|
- "traefik.http.routers.refund-secure.tls.certresolver=letsencrypt"
|
||||||
|
networks:
|
||||||
|
- proxy
|
||||||
|
|
||||||
|
networks:
|
||||||
|
proxy:
|
||||||
|
external: true
|
||||||
Loading…
Add table
Reference in a new issue