From 60f3fe0064a0463f7af0044b260a56cf068d60ee Mon Sep 17 00:00:00 2001 From: asus Date: Sun, 4 Feb 2024 12:00:33 +0100 Subject: [PATCH] wip mv map_prof plugin outside docker --- Makefile | 1 + README.md | 1 + .../map_prof => map_prof}/images/marker.png | Bin .../images/marker_cluster.png | Bin .../map_prof => map_prof}/map_prof_hooks.php | 0 .../map_prof => map_prof}/mp_enqueue.php | 0 .../scripts/mp_create_filters.js | 0 .../scripts/mp_create_map.js | 0 .../scripts/mp_create_markers.js | 0 .../scripts/mp_draw_clusters.js | 0 .../scripts/mp_errors_map.js | 0 .../scripts/mp_filter_events.js | 0 .../scripts/mp_info_window.js | 0 .../scripts/mp_init_map.js | 0 .../scripts/mp_publish_error.js | 0 .../settings/mp_globals.php | 0 .../settings/mp_optionnals.php | 0 .../settings/mp_required.php | 0 .../settings/mp_url_api.php | 0 .../srcs/errors/mp_address_errors.php | 0 .../srcs/map/mp_add_to_scripts.php | 0 .../srcs/map/mp_create_div.php | 0 .../srcs/map/mp_get_events.php | 0 .../srcs/map/mp_get_filters.php | 0 .../srcs/map/mp_get_locations.php | 0 .../srcs/map_posts/mp_post_events_pages.php | 0 .../srcs/menu/mp_menu_content.php | 0 .../srcs/publish/mp_get_coordinates.php | 0 .../srcs/publish/mp_update_publish.php | 0 .../styles/mp__style.css | 0 .../styles/mp_filters.css | 0 .../styles/mp_info_windows.css | 0 .../map_prof => map_prof}/styles/mp_zoom.css | 0 .../utils/mp_console_log.php | 0 .../map_prof => map_prof}/utils/mp_get_ip.php | 0 notes.md | 2 ++ srcs/.env | 4 ++-- srcs/requirements/wordpress/Dockerfile | 2 ++ .../wordpress/conf/wp_entrypoint.sh | 21 +++++++++++------- 39 files changed, 21 insertions(+), 10 deletions(-) rename {srcs/plugins/map_prof => map_prof}/images/marker.png (100%) rename {srcs/plugins/map_prof => map_prof}/images/marker_cluster.png (100%) rename {srcs/plugins/map_prof => map_prof}/map_prof_hooks.php (100%) rename {srcs/plugins/map_prof => map_prof}/mp_enqueue.php (100%) rename {srcs/plugins/map_prof => map_prof}/scripts/mp_create_filters.js (100%) rename {srcs/plugins/map_prof => map_prof}/scripts/mp_create_map.js (100%) rename {srcs/plugins/map_prof => map_prof}/scripts/mp_create_markers.js (100%) rename {srcs/plugins/map_prof => map_prof}/scripts/mp_draw_clusters.js (100%) rename {srcs/plugins/map_prof => map_prof}/scripts/mp_errors_map.js (100%) rename {srcs/plugins/map_prof => map_prof}/scripts/mp_filter_events.js (100%) rename {srcs/plugins/map_prof => map_prof}/scripts/mp_info_window.js (100%) rename {srcs/plugins/map_prof => map_prof}/scripts/mp_init_map.js (100%) rename {srcs/plugins/map_prof => map_prof}/scripts/mp_publish_error.js (100%) rename {srcs/plugins/map_prof => map_prof}/settings/mp_globals.php (100%) rename {srcs/plugins/map_prof => map_prof}/settings/mp_optionnals.php (100%) rename {srcs/plugins/map_prof => map_prof}/settings/mp_required.php (100%) rename {srcs/plugins/map_prof => map_prof}/settings/mp_url_api.php (100%) rename {srcs/plugins/map_prof => map_prof}/srcs/errors/mp_address_errors.php (100%) rename {srcs/plugins/map_prof => map_prof}/srcs/map/mp_add_to_scripts.php (100%) rename {srcs/plugins/map_prof => map_prof}/srcs/map/mp_create_div.php (100%) rename {srcs/plugins/map_prof => map_prof}/srcs/map/mp_get_events.php (100%) rename {srcs/plugins/map_prof => map_prof}/srcs/map/mp_get_filters.php (100%) rename {srcs/plugins/map_prof => map_prof}/srcs/map/mp_get_locations.php (100%) rename {srcs/plugins/map_prof => map_prof}/srcs/map_posts/mp_post_events_pages.php (100%) rename {srcs/plugins/map_prof => map_prof}/srcs/menu/mp_menu_content.php (100%) rename {srcs/plugins/map_prof => map_prof}/srcs/publish/mp_get_coordinates.php (100%) rename {srcs/plugins/map_prof => map_prof}/srcs/publish/mp_update_publish.php (100%) rename {srcs/plugins/map_prof => map_prof}/styles/mp__style.css (100%) rename {srcs/plugins/map_prof => map_prof}/styles/mp_filters.css (100%) rename {srcs/plugins/map_prof => map_prof}/styles/mp_info_windows.css (100%) rename {srcs/plugins/map_prof => map_prof}/styles/mp_zoom.css (100%) rename {srcs/plugins/map_prof => map_prof}/utils/mp_console_log.php (100%) rename {srcs/plugins/map_prof => map_prof}/utils/mp_get_ip.php (100%) diff --git a/Makefile b/Makefile index 919d5e9..7dec9ca 100644 --- a/Makefile +++ b/Makefile @@ -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 # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # diff --git a/README.md b/README.md index e69de29..ae3e964 100644 --- a/README.md +++ b/README.md @@ -0,0 +1 @@ +# jipf 2023 diff --git a/srcs/plugins/map_prof/images/marker.png b/map_prof/images/marker.png similarity index 100% rename from srcs/plugins/map_prof/images/marker.png rename to map_prof/images/marker.png diff --git a/srcs/plugins/map_prof/images/marker_cluster.png b/map_prof/images/marker_cluster.png similarity index 100% rename from srcs/plugins/map_prof/images/marker_cluster.png rename to map_prof/images/marker_cluster.png diff --git a/srcs/plugins/map_prof/map_prof_hooks.php b/map_prof/map_prof_hooks.php similarity index 100% rename from srcs/plugins/map_prof/map_prof_hooks.php rename to map_prof/map_prof_hooks.php diff --git a/srcs/plugins/map_prof/mp_enqueue.php b/map_prof/mp_enqueue.php similarity index 100% rename from srcs/plugins/map_prof/mp_enqueue.php rename to map_prof/mp_enqueue.php diff --git a/srcs/plugins/map_prof/scripts/mp_create_filters.js b/map_prof/scripts/mp_create_filters.js similarity index 100% rename from srcs/plugins/map_prof/scripts/mp_create_filters.js rename to map_prof/scripts/mp_create_filters.js diff --git a/srcs/plugins/map_prof/scripts/mp_create_map.js b/map_prof/scripts/mp_create_map.js similarity index 100% rename from srcs/plugins/map_prof/scripts/mp_create_map.js rename to map_prof/scripts/mp_create_map.js diff --git a/srcs/plugins/map_prof/scripts/mp_create_markers.js b/map_prof/scripts/mp_create_markers.js similarity index 100% rename from srcs/plugins/map_prof/scripts/mp_create_markers.js rename to map_prof/scripts/mp_create_markers.js diff --git a/srcs/plugins/map_prof/scripts/mp_draw_clusters.js b/map_prof/scripts/mp_draw_clusters.js similarity index 100% rename from srcs/plugins/map_prof/scripts/mp_draw_clusters.js rename to map_prof/scripts/mp_draw_clusters.js diff --git a/srcs/plugins/map_prof/scripts/mp_errors_map.js b/map_prof/scripts/mp_errors_map.js similarity index 100% rename from srcs/plugins/map_prof/scripts/mp_errors_map.js rename to map_prof/scripts/mp_errors_map.js diff --git a/srcs/plugins/map_prof/scripts/mp_filter_events.js b/map_prof/scripts/mp_filter_events.js similarity index 100% rename from srcs/plugins/map_prof/scripts/mp_filter_events.js rename to map_prof/scripts/mp_filter_events.js diff --git a/srcs/plugins/map_prof/scripts/mp_info_window.js b/map_prof/scripts/mp_info_window.js similarity index 100% rename from srcs/plugins/map_prof/scripts/mp_info_window.js rename to map_prof/scripts/mp_info_window.js diff --git a/srcs/plugins/map_prof/scripts/mp_init_map.js b/map_prof/scripts/mp_init_map.js similarity index 100% rename from srcs/plugins/map_prof/scripts/mp_init_map.js rename to map_prof/scripts/mp_init_map.js diff --git a/srcs/plugins/map_prof/scripts/mp_publish_error.js b/map_prof/scripts/mp_publish_error.js similarity index 100% rename from srcs/plugins/map_prof/scripts/mp_publish_error.js rename to map_prof/scripts/mp_publish_error.js diff --git a/srcs/plugins/map_prof/settings/mp_globals.php b/map_prof/settings/mp_globals.php similarity index 100% rename from srcs/plugins/map_prof/settings/mp_globals.php rename to map_prof/settings/mp_globals.php diff --git a/srcs/plugins/map_prof/settings/mp_optionnals.php b/map_prof/settings/mp_optionnals.php similarity index 100% rename from srcs/plugins/map_prof/settings/mp_optionnals.php rename to map_prof/settings/mp_optionnals.php diff --git a/srcs/plugins/map_prof/settings/mp_required.php b/map_prof/settings/mp_required.php similarity index 100% rename from srcs/plugins/map_prof/settings/mp_required.php rename to map_prof/settings/mp_required.php diff --git a/srcs/plugins/map_prof/settings/mp_url_api.php b/map_prof/settings/mp_url_api.php similarity index 100% rename from srcs/plugins/map_prof/settings/mp_url_api.php rename to map_prof/settings/mp_url_api.php diff --git a/srcs/plugins/map_prof/srcs/errors/mp_address_errors.php b/map_prof/srcs/errors/mp_address_errors.php similarity index 100% rename from srcs/plugins/map_prof/srcs/errors/mp_address_errors.php rename to map_prof/srcs/errors/mp_address_errors.php diff --git a/srcs/plugins/map_prof/srcs/map/mp_add_to_scripts.php b/map_prof/srcs/map/mp_add_to_scripts.php similarity index 100% rename from srcs/plugins/map_prof/srcs/map/mp_add_to_scripts.php rename to map_prof/srcs/map/mp_add_to_scripts.php diff --git a/srcs/plugins/map_prof/srcs/map/mp_create_div.php b/map_prof/srcs/map/mp_create_div.php similarity index 100% rename from srcs/plugins/map_prof/srcs/map/mp_create_div.php rename to map_prof/srcs/map/mp_create_div.php diff --git a/srcs/plugins/map_prof/srcs/map/mp_get_events.php b/map_prof/srcs/map/mp_get_events.php similarity index 100% rename from srcs/plugins/map_prof/srcs/map/mp_get_events.php rename to map_prof/srcs/map/mp_get_events.php diff --git a/srcs/plugins/map_prof/srcs/map/mp_get_filters.php b/map_prof/srcs/map/mp_get_filters.php similarity index 100% rename from srcs/plugins/map_prof/srcs/map/mp_get_filters.php rename to map_prof/srcs/map/mp_get_filters.php diff --git a/srcs/plugins/map_prof/srcs/map/mp_get_locations.php b/map_prof/srcs/map/mp_get_locations.php similarity index 100% rename from srcs/plugins/map_prof/srcs/map/mp_get_locations.php rename to map_prof/srcs/map/mp_get_locations.php diff --git a/srcs/plugins/map_prof/srcs/map_posts/mp_post_events_pages.php b/map_prof/srcs/map_posts/mp_post_events_pages.php similarity index 100% rename from srcs/plugins/map_prof/srcs/map_posts/mp_post_events_pages.php rename to map_prof/srcs/map_posts/mp_post_events_pages.php diff --git a/srcs/plugins/map_prof/srcs/menu/mp_menu_content.php b/map_prof/srcs/menu/mp_menu_content.php similarity index 100% rename from srcs/plugins/map_prof/srcs/menu/mp_menu_content.php rename to map_prof/srcs/menu/mp_menu_content.php diff --git a/srcs/plugins/map_prof/srcs/publish/mp_get_coordinates.php b/map_prof/srcs/publish/mp_get_coordinates.php similarity index 100% rename from srcs/plugins/map_prof/srcs/publish/mp_get_coordinates.php rename to map_prof/srcs/publish/mp_get_coordinates.php diff --git a/srcs/plugins/map_prof/srcs/publish/mp_update_publish.php b/map_prof/srcs/publish/mp_update_publish.php similarity index 100% rename from srcs/plugins/map_prof/srcs/publish/mp_update_publish.php rename to map_prof/srcs/publish/mp_update_publish.php diff --git a/srcs/plugins/map_prof/styles/mp__style.css b/map_prof/styles/mp__style.css similarity index 100% rename from srcs/plugins/map_prof/styles/mp__style.css rename to map_prof/styles/mp__style.css diff --git a/srcs/plugins/map_prof/styles/mp_filters.css b/map_prof/styles/mp_filters.css similarity index 100% rename from srcs/plugins/map_prof/styles/mp_filters.css rename to map_prof/styles/mp_filters.css diff --git a/srcs/plugins/map_prof/styles/mp_info_windows.css b/map_prof/styles/mp_info_windows.css similarity index 100% rename from srcs/plugins/map_prof/styles/mp_info_windows.css rename to map_prof/styles/mp_info_windows.css diff --git a/srcs/plugins/map_prof/styles/mp_zoom.css b/map_prof/styles/mp_zoom.css similarity index 100% rename from srcs/plugins/map_prof/styles/mp_zoom.css rename to map_prof/styles/mp_zoom.css diff --git a/srcs/plugins/map_prof/utils/mp_console_log.php b/map_prof/utils/mp_console_log.php similarity index 100% rename from srcs/plugins/map_prof/utils/mp_console_log.php rename to map_prof/utils/mp_console_log.php diff --git a/srcs/plugins/map_prof/utils/mp_get_ip.php b/map_prof/utils/mp_get_ip.php similarity index 100% rename from srcs/plugins/map_prof/utils/mp_get_ip.php rename to map_prof/utils/mp_get_ip.php diff --git a/notes.md b/notes.md index 55f41ed..01cdea2 100644 --- a/notes.md +++ b/notes.md @@ -6,4 +6,6 @@ - delete first blank line - close last line comment +### commands +- `docker exec -ti bash` to run bash inside a running container diff --git a/srcs/.env b/srcs/.env index c0e1292..746564e 100644 --- a/srcs/.env +++ b/srcs/.env @@ -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 diff --git a/srcs/requirements/wordpress/Dockerfile b/srcs/requirements/wordpress/Dockerfile index b460fce..f637126 100644 --- a/srcs/requirements/wordpress/Dockerfile +++ b/srcs/requirements/wordpress/Dockerfile @@ -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}/* diff --git a/srcs/requirements/wordpress/conf/wp_entrypoint.sh b/srcs/requirements/wordpress/conf/wp_entrypoint.sh index 6fe66a3..14b9878 100644 --- a/srcs/requirements/wordpress/conf/wp_entrypoint.sh +++ b/srcs/requirements/wordpress/conf/wp_entrypoint.sh @@ -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