Start php
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Fabian Stamm 2021-04-21 19:42:01 +02:00
parent 33a63cf4aa
commit 1d936181e7
2 changed files with 11 additions and 1 deletions

View File

@ -22,6 +22,8 @@ LABEL maintainer "Fabian Stamm <dev@fabianstamm.de>"
RUN echo http://dl-cdn.alpinelinux.org/alpine/v3.9/community >> /etc/apk/repositories
RUN apk add --no-cache php7 php7-fpm php7-opcache php7-curl php7-json php7-zip
RUN sed 's/listen = 127.0.0.1:9000/listen = \/run\/php-fpm.sock/g'
COPY --from=builder /usr/bin/caddy /usr/bin/caddy
@ -37,4 +39,7 @@ WORKDIR /srv
COPY Caddyfile /etc/Caddyfile
CMD ["caddy", "run", "--config", "/etc/Caddyfile", "--adapter", "caddyfile"]
COPY start.sh /start.sh
RUN chmod +x /start.sh
CMD ["/bin/sh", "/start.sh"]

5
start.sh Normal file
View File

@ -0,0 +1,5 @@
#!/bin/sh
/usr/sbin/php-fpm7 --allow-to-run-as-root -D --fpm-config /etc/php7/php-fpm.conf
caddy run --config /etc/Caddyfile --adapter caddyfile