re-added gestion for plugins volume outside folder

This commit is contained in:
asus
2024-02-06 11:24:05 +01:00
parent f43de228c6
commit 00473e1288
7 changed files with 45 additions and 10 deletions

View File

@@ -23,7 +23,7 @@ RUN adduser -S www-data && \
# ARG variables are not persistent after the build process, in opposite to ENV
ARG WP_URL
ARG WP_VOLUME_DIR
ARG NG_VOLUME_CERTS
ARG NG_CERTS_DIR
ARG SERVER_MAX_UPLOAD_SIZE
# replace WP_URL
@@ -42,10 +42,10 @@ RUN sed -i "s/\(client_max_body_size \).*\(m;\)/\1${SERVER_MAX_UPLOAD_SIZE}\2/g"
# - C, ST, L, O, OU, CN : country, state, locality, organization, organizational unit, and common name
# - keyout : the filename for the private key file
# - out : the filename for the output certificate file
ARG SSL_KEY=${NG_VOLUME_CERTS}/private/${WP_URL}.key
ARG SSL_CERT=${NG_VOLUME_CERTS}/certs/${WP_URL}.crt
RUN mkdir -p ${NG_VOLUME_CERTS}; \
cd ${NG_VOLUME_CERTS}; \
ARG SSL_KEY=${NG_CERTS_DIR}/private/${WP_URL}.key
ARG SSL_CERT=${NG_CERTS_DIR}/certs/${WP_URL}.crt
RUN mkdir -p ${NG_CERTS_DIR}; \
cd ${NG_CERTS_DIR}; \
mkdir private certs; \
openssl req -newkey rsa:2048 -nodes -x509 -days 365 \
-subj "/C=fr/ST=ile-de-france/L=paris/O=wp/OU=wp_local/CN=${WP_URL}" \

View File

@@ -58,6 +58,12 @@ then
chown -R www-data:www-data /var/www/*
chmod 755 -R /var/www/*
echo -e ${YELLOW}plugins...${RESET}
plugins=$(ls ${WP_VOLUME_PLUGINS})
for dir in $plugins; do
ln -s ${WP_VOLUME_PLUGINS}/$dir ${WP_VOLUME_DIR}/wp-content/plugins/$dir
done
echo -e ${GREEN}done !${RESET}
else