Dockerise php-fpm
This commit is contained in:
parent
6d99671afd
commit
4a22431370
5 changed files with 49 additions and 1 deletions
|
@ -77,6 +77,7 @@ Image | Purpose
|
||||||
`shiori` | Dockerised [shiori](https://github.com/go-shiori/shiori), built from source
|
`shiori` | Dockerised [shiori](https://github.com/go-shiori/shiori), built from source
|
||||||
`tinyproxy` | Dockerised [tinyproxy](https://tinyproxy.github.io/) - config file should be mounted read-only to `/srv/tinyproxy.conf`
|
`tinyproxy` | Dockerised [tinyproxy](https://tinyproxy.github.io/) - config file should be mounted read-only to `/srv/tinyproxy.conf`
|
||||||
`nginx` | Dockerised nginx
|
`nginx` | Dockerised nginx
|
||||||
|
`php-fpm` | Dockerised php-fpm [CURRENTLY: php 8.3]
|
||||||
|
|
||||||
|
|
||||||
## Docker container UID/GID map
|
## Docker container UID/GID map
|
||||||
|
@ -99,6 +100,7 @@ UID | GID | Container | Notes
|
||||||
10400 | 10400 | json2collectdmqtt | `chown` environment file to `10400:10400`, as it's loaded by a startup shell script inside the container
|
10400 | 10400 | json2collectdmqtt | `chown` environment file to `10400:10400`, as it's loaded by a startup shell script inside the container
|
||||||
10500 | 10500 | n8n |
|
10500 | 10500 | n8n |
|
||||||
10600 | 10600 | kiwix |
|
10600 | 10600 | kiwix |
|
||||||
|
10700 | 10700 | php-fpm |
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
Container from the main public Docker registry:
|
Container from the main public Docker registry:
|
||||||
|
|
27
images/php-fpm/Dockerfile
Normal file
27
images/php-fpm/Dockerfile
Normal file
|
@ -0,0 +1,27 @@
|
||||||
|
ARG REPO_LOCATION
|
||||||
|
# ARG BASE_VERSION
|
||||||
|
|
||||||
|
FROM ${REPO_LOCATION}minideb as builder
|
||||||
|
|
||||||
|
RUN install_packages lsb-release ca-certificates curl
|
||||||
|
|
||||||
|
RUN curl -sSLo /usr/share/keyrings/deb.sury.org-php.gpg https://packages.sury.org/php/apt.gpg
|
||||||
|
|
||||||
|
RUN sh -c 'echo "deb [signed-by=/usr/share/keyrings/deb.sury.org-php.gpg] https://packages.sury.org/php/ $(lsb_release -sc) main" > /etc/apt/sources.list.d/php.list'
|
||||||
|
|
||||||
|
FROM ${REPO_LOCATION}minideb
|
||||||
|
|
||||||
|
COPY --from=builder /usr/share/keyrings/deb.sury.org-php.gpg /usr/share/keyrings/deb.sury.org-php.gpg
|
||||||
|
COPY --from=builder /etc/apt/sources.list.d/php.list /etc/apt/sources.list.d/php.list
|
||||||
|
|
||||||
|
|
||||||
|
RUN install_packages php8.3-fpm php8.3-mbstring php8.3-imagick php8.3-zip php8.3-intl php8.3-sqlite3
|
||||||
|
COPY php-sbrl.ini /etc/php/8.3/fpm/conf.d/sbrl.ini
|
||||||
|
COPY www.conf /etc/php/8.3/fpm/www.conf
|
||||||
|
|
||||||
|
VOLUME [ "/srv" ]
|
||||||
|
|
||||||
|
USER 10700:10700
|
||||||
|
|
||||||
|
WORKDIR /srv
|
||||||
|
ENTRYPOINT [ "/usr/sbin/php-fpm8.3", "--nodaemonize", "--fpm-config", "/etc/php/8.3/fpm/php-fpm.conf" ]
|
6
images/php-fpm/php-sbrl.ini
Normal file
6
images/php-fpm/php-sbrl.ini
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
|
||||||
|
post_max_size = 20M
|
||||||
|
upload_max_filesize = 20M
|
||||||
|
|
||||||
|
[Date]
|
||||||
|
date.timezone = Europe/London
|
1
images/php-fpm/type.txt
Normal file
1
images/php-fpm/type.txt
Normal file
|
@ -0,0 +1 @@
|
||||||
|
docker
|
12
images/php-fpm/www.conf
Normal file
12
images/php-fpm/www.conf
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
[www]
|
||||||
|
user = www-data
|
||||||
|
group = www-data
|
||||||
|
listen = 0.0.0.0:9989
|
||||||
|
listen.owner = www-data
|
||||||
|
listen.group = www-data
|
||||||
|
pm = dynamic
|
||||||
|
pm.max_children = 8
|
||||||
|
pm.start_servers = 2
|
||||||
|
pm.min_spare_servers = 1
|
||||||
|
pm.max_spare_servers = 2
|
||||||
|
|
Loading…
Reference in a new issue