wip mv map_prof plugin outside docker

This commit is contained in:
asus
2024-02-04 12:00:33 +01:00
parent 22344ee724
commit 60f3fe0064
39 changed files with 21 additions and 10 deletions

View File

@@ -85,6 +85,7 @@ RUNNING = $(shell docker ps -q)
# list of volumes
VOLUMES = $(shell docker volume ls -q)
# ln -s ${WP_VOLUME_PLUGINS}/$dir ${WP_VOLUME_DIR}/wp-content/plugins/$dir
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - #
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - #

View File

@@ -0,0 +1 @@
# jipf 2023

View File

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 13 KiB

View File

Before

Width:  |  Height:  |  Size: 10 KiB

After

Width:  |  Height:  |  Size: 10 KiB

View File

@@ -6,4 +6,6 @@
- delete first blank line
- close last line comment
### commands
- `docker exec -ti <container-name> bash` to run bash inside a running container

View File

@@ -42,8 +42,8 @@ EXECUTION_TIME=300
#EXPEND_HOST_VOLUME_PLUGINS=$PWD_PATH/srcs/plugins
#EXPEND_HOST_VOLUME_CERTS=$PWD_PATH/srcs/requirements/nginx/conf/ssl
# EXPENDED LINES :
HOST_VOLUME_CERTS=/home/asususus/nextcloud_backup/backup_planethoster_server/nextclouddata/hugogogo/files/informatique/lejourduprof/srcs/requirements/nginx/conf/ssl
HOST_VOLUME_PLUGINS=/home/asususus/nextcloud_backup/backup_planethoster_server/nextclouddata/hugogogo/files/informatique/lejourduprof/srcs/plugins
HOST_VOLUME_CERTS=/home/asususus/nextcloud_backup/backup_planethoster_server/nextclouddata/hugogogo/files/informatique/jipf_2023/srcs/requirements/nginx/conf/ssl
HOST_VOLUME_PLUGINS=/home/asususus/nextcloud_backup/backup_planethoster_server/nextclouddata/hugogogo/files/informatique/jipf_2023/srcs/plugins
HOST_VOLUME_DB=/home/asususus/data/lejourduprof/db_volume
HOST_VOLUME_WP=/home/asususus/data/lejourduprof/wp_volume

View File

@@ -32,6 +32,8 @@ ARG MAX_UPLOAD_SIZE
ARG EXECUTION_TIME
# create and empty volumes dir
# WP_VOLUME_DIR=/var/www/html
# WP_VOLUME_PLUGINS=/home/www-data
RUN mkdir -p ${WP_VOLUME_DIR} ${WP_VOLUME_PLUGINS} && \
rm -rf ${WP_VOLUME_DIR}/* ${WP_VOLUME_PLUGINS}/*

View File

@@ -31,16 +31,18 @@ fi
if ! wp core is-installed --path="${WP_VOLUME_DIR}" 2> /dev/null
then
echo -e ${YELLOW}installing...${RESET}
echo -e ${YELLOW}wp config create...${RESET}
#wp config create \
echo -e ${YELLOW}wp config create...${RESET}
php wp-cli.phar config create \
--dbhost="${DB_HOST}" \
--dbname="${DB_NAME}" \
--dbuser="${DB_USER}" \
--dbpass="${DB_PSWD}" \
--path="${WP_VOLUME_DIR}" --allow-root
echo -e ${YELLOW}wp core install...${RESET}
#wp core install \
echo -e ${YELLOW}wp core install...${RESET}
php wp-cli.phar core install \
--url="${WP_URL}" \
--title="${WP_TITLE}" \
@@ -49,8 +51,9 @@ then
--admin_password="${WP_ADMIN_PSWD}" \
--skip-email \
--path="${WP_VOLUME_DIR}" --allow-root
echo -e ${YELLOW}wp user create...${RESET}
#wp user create \
echo -e ${YELLOW}wp user create...${RESET}
php wp-cli.phar user create \
"${WP_USER}" "${WP_USER_EMAIL}" \
--user_pass="${WP_USER_PSWD}" \
@@ -60,12 +63,14 @@ 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 ${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
echo -e ${GREEN}wp is installed${RESET}
fi