mirror of
https://github.com/EpicMorg/docker-scripts.git
synced 2024-12-25 06:05:37 +03:00
apache2 php8.1
This commit is contained in:
parent
85271843d8
commit
ce5c93c2ec
@ -54,13 +54,6 @@ RUN apt-get update && \
|
||||
##################################################################
|
||||
RUN echo "TLS_REQCERT never" >> /etc/ldap/ldap.conf
|
||||
|
||||
##################################################################
|
||||
# Installing IOnCube addon
|
||||
##################################################################
|
||||
#RUN echo "zend_extension = ${PHP_MODULE_PATH}/ioncube_loader_lin_7.4.so" >> ${PHP_DIR}/apache2/php.ini && \
|
||||
# php -m && \
|
||||
# php -v
|
||||
|
||||
##################################################################
|
||||
# Installing timezonedb addon
|
||||
##################################################################
|
||||
|
111
linux/ecosystem/apache2/php8.1/Dockerfile
Normal file
111
linux/ecosystem/apache2/php8.1/Dockerfile
Normal file
@ -0,0 +1,111 @@
|
||||
FROM epicmorg/php:php8.1
|
||||
LABEL maintainer="EpicMorg DevTeam, developer@epicm.org"
|
||||
ARG DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
ARG PHP_MODULE_VER=20210902
|
||||
ARG PHP_MODULE_PATH=/usr/lib/php/${PHP_MODULE_VER}
|
||||
ARG PHP_VER=8.1
|
||||
ARG PHP_DIR=/etc/php/${PHP_VER}
|
||||
ARG P4_PHP_INI=${PHP_DIR}/mods-available/perfroce.ini
|
||||
ARG SMB_PHP_INI=${PHP_DIR}/mods-available/smbclient.ini
|
||||
|
||||
##################################################################
|
||||
# Installing Apache2
|
||||
##################################################################
|
||||
#installing apache2 repo
|
||||
RUN wget -O /etc/apt/trusted.gpg.d/apache2.gpg https://packages.sury.org/apache2/apt.gpg
|
||||
RUN sh -c 'echo "deb https://packages.sury.org/apache2/ buster main" > /etc/apt/sources.list.d/apache2.list'
|
||||
|
||||
#Install base packages
|
||||
RUN apt-get update && \
|
||||
apt-get install -y --allow-unauthenticated \
|
||||
apache2 \
|
||||
apache2-utils \
|
||||
libapache2-mod-php8.1 \
|
||||
libapache2-mod-webauth \
|
||||
libapache2-mod-xforward \
|
||||
libapache2-mod-security2 && \
|
||||
a2enmod \
|
||||
php8.1 \
|
||||
rewrite \
|
||||
ldap \
|
||||
heartmonitor \
|
||||
auth_basic \
|
||||
authnz_ldap \
|
||||
headers \
|
||||
heartbeat \
|
||||
slotmem_shm \
|
||||
lua \
|
||||
mime \
|
||||
status \
|
||||
xml2enc \
|
||||
xforward \
|
||||
remoteip \
|
||||
filter \
|
||||
dav \
|
||||
dav_fs \
|
||||
alias && \
|
||||
ln -sf /etc/ssl/dhparam.pem /etc/apache2/dhparam.pem && \
|
||||
php -m && \
|
||||
php -v
|
||||
|
||||
##################################################################
|
||||
# LDAP Fix
|
||||
##################################################################
|
||||
RUN echo "TLS_REQCERT never" >> /etc/ldap/ldap.conf
|
||||
|
||||
##################################################################
|
||||
# Installing IOnCube addon
|
||||
##################################################################
|
||||
RUN echo "zend_extension = ${PHP_MODULE_PATH}/ioncube_loader_lin_8.1.so" >> ${PHP_DIR}/apache2/php.ini && \
|
||||
php -m && \
|
||||
php -v
|
||||
|
||||
##################################################################
|
||||
# Installing timezonedb addon
|
||||
##################################################################
|
||||
RUN echo "extension = ${PHP_MODULE_PATH}/timezonedb.so" >> ${PHP_DIR}/apache2/php.ini && \
|
||||
php -m && \
|
||||
php -v
|
||||
|
||||
##################################################################
|
||||
# Installing imagic addon
|
||||
##################################################################
|
||||
RUN echo "extension = ${PHP_MODULE_PATH}/imagick.so" >> ${PHP_DIR}/apache2/php.ini && \
|
||||
php -m && \
|
||||
php -v
|
||||
|
||||
##################################################################
|
||||
# Installing smbclient addon
|
||||
##################################################################
|
||||
RUN ln -sf ${SMB_PHP_INI} ${PHP_DIR}/apache2/conf.d/smbclient.ini && \
|
||||
php -m && \
|
||||
php -v
|
||||
|
||||
##################################################################
|
||||
# cleaninig up
|
||||
##################################################################
|
||||
RUN apt clean -y && \
|
||||
apt autoclean -y && \
|
||||
rm -rfv /var/lib/apt/lists/* && \
|
||||
rm -rfv /var/cache/apt/archives/*.deb && \
|
||||
rm -rfv /tmp/deb/* && \
|
||||
rm -rfv /tmp/ioncube/* && \
|
||||
rm -rfv /tmp/composer-setup.php && \
|
||||
rm -rfv /tmp/ioncube.tar.gz
|
||||
|
||||
#healthcheck. good practice
|
||||
HEALTHCHECK --interval=2m --timeout=3s CMD curl -f http://localhost:80/ || exit 1
|
||||
|
||||
# Add image configuration and scripts
|
||||
COPY docker-entrypoint.sh /usr/bin/docker-entrypoint.sh
|
||||
RUN chmod 755 /usr/bin/docker-entrypoint.sh
|
||||
RUN chown -Rf www-data:www-data /var/www
|
||||
|
||||
#Final config
|
||||
VOLUME ["/var/www"]
|
||||
WORKDIR /var/www/
|
||||
EXPOSE 80 443
|
||||
|
||||
ENTRYPOINT ["tini", "-s", "--", "docker-entrypoint.sh"]
|
||||
CMD ["docker-entrypoint.sh"]
|
19
linux/ecosystem/apache2/php8.1/Makefile
Normal file
19
linux/ecosystem/apache2/php8.1/Makefile
Normal file
@ -0,0 +1,19 @@
|
||||
all: app
|
||||
|
||||
app:
|
||||
make build
|
||||
make deploy
|
||||
make clean
|
||||
|
||||
build:
|
||||
docker-compose build --compress --parallel --progress plain
|
||||
|
||||
deploy:
|
||||
docker-compose push
|
||||
|
||||
clean:
|
||||
docker container prune -f
|
||||
docker image prune -f
|
||||
docker network prune -f
|
||||
docker volume prune -f
|
||||
docker system prune -af
|
32
linux/ecosystem/apache2/php8.1/README.md
Normal file
32
linux/ecosystem/apache2/php8.1/README.md
Normal file
@ -0,0 +1,32 @@
|
||||
# Compose example
|
||||
|
||||
```yml
|
||||
version: '3.7'
|
||||
services:
|
||||
websites:
|
||||
image: epicmorg/websites
|
||||
# depends_on:
|
||||
# - mysql
|
||||
# - memcached
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
- /etc/localtime:/etc/localtime
|
||||
- /etc/timezone:/etc/timezone
|
||||
# - /etc/letsencrypt:/etc/letsencrypt
|
||||
- www:/var/www
|
||||
- apache2:/etc/apache2
|
||||
- php:/etc/php
|
||||
restart: unless-stopped
|
||||
# extra_hosts:
|
||||
# - "example.com:192.168.0.11"
|
||||
tmpfs:
|
||||
- /tmp
|
||||
- /var/lib/php/sessions
|
||||
volumes:
|
||||
www:
|
||||
external: true
|
||||
apache2:
|
||||
external: true
|
||||
php:
|
||||
external: true
|
||||
```
|
6
linux/ecosystem/apache2/php8.1/docker-compose.yml
Normal file
6
linux/ecosystem/apache2/php8.1/docker-compose.yml
Normal file
@ -0,0 +1,6 @@
|
||||
version: '3.9'
|
||||
services:
|
||||
app:
|
||||
image: "epicmorg/apache2:php8.1"
|
||||
build:
|
||||
context: .
|
18
linux/ecosystem/apache2/php8.1/docker-entrypoint.sh
Executable file
18
linux/ecosystem/apache2/php8.1/docker-entrypoint.sh
Executable file
@ -0,0 +1,18 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [[ -z "${FIX_WWW_DATA}" ]]; then
|
||||
echo "[apache2] env FIX_WWW_DATA is not set. Skipping..."
|
||||
elif [ "${FIX_WWW_DATA}" == "false" ]; then
|
||||
echo "[apache2] env FIX_WWW_DATA is set to false. Skipping..."
|
||||
elif [ "${FIX_WWW_DATA}" == "true" ]; then
|
||||
echo "[apache2] Changing permissions for /var/www path. Dont worry, please wait."
|
||||
chown www-data:www-data /var/www -R
|
||||
echo "[apache2] Done"
|
||||
else
|
||||
echo "[apache2] env FIX_WWW_DATA is set to strange value. Skipping..."
|
||||
fi
|
||||
|
||||
echo "[apache2] Starting up"
|
||||
source /etc/apache2/envvars
|
||||
tail -F /var/log/apache2/* &
|
||||
exec apache2 -D FOREGROUND
|
Loading…
Reference in New Issue
Block a user