correction des variables
This commit is contained in:
parent
abe8cd09cb
commit
3f1d5a191c
|
|
@ -13,8 +13,8 @@ if [[ -z "$CMS_DIRECTORY" ]]; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "set -g default-shell /bin/sh" >> /etc/tmux.conf
|
echo "set -g default-shell /bin/sh" >> /etc/tmux.conf
|
||||||
mkdir "$CMS_DIRECTORY"
|
mkdir $CMS_DIRECTORY
|
||||||
chown www-data:www-data "$CMS_DIRECTORY"
|
chown www-data:www-data $CMS_DIRECTORY
|
||||||
|
|
||||||
echo -e "${PURPLE}${BOLD}Import the Directus database ? (y/N) ${RESET}"
|
echo -e "${PURPLE}${BOLD}Import the Directus database ? (y/N) ${RESET}"
|
||||||
read answer
|
read answer
|
||||||
|
|
@ -35,6 +35,10 @@ else
|
||||||
echo -e "${ORANGE}${BOLD}User role ${RESET}${ORANGE}All permissions on content collections, directus_files and directus_folders${RESET}"
|
echo -e "${ORANGE}${BOLD}User role ${RESET}${ORANGE}All permissions on content collections, directus_files and directus_folders${RESET}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [[ -z "$CADDYFILE" ]]; then
|
||||||
|
CADDYFILE="/etc/caddy/Caddyfile"
|
||||||
|
fi
|
||||||
|
|
||||||
echo "cms.${DOMAIN_NAME} {" >> $CADDYFILE
|
echo "cms.${DOMAIN_NAME} {" >> $CADDYFILE
|
||||||
echo "reverse_proxy ${ip}:${port}" >> $CADDYFILE
|
echo "reverse_proxy ${ip}:${port}" >> $CADDYFILE
|
||||||
echo "}" >> $CADDYFILE
|
echo "}" >> $CADDYFILE
|
||||||
|
|
|
||||||
|
|
@ -8,6 +8,10 @@ echo -e "${BLUE}git push origin prod${RESET}"
|
||||||
echo -e "${PURPLE}${BOLD}Enter the .git url of the repo${RESET}"
|
echo -e "${PURPLE}${BOLD}Enter the .git url of the repo${RESET}"
|
||||||
read repo_url
|
read repo_url
|
||||||
|
|
||||||
|
if [[ -z "$REPO_DIRECTORY" ]]; then
|
||||||
|
. bin/set_url.sh
|
||||||
|
fi
|
||||||
|
|
||||||
front_repo_name=$(echo "$repo_url" | sed 's#.*/\([^/]*\)\.git#\1#')
|
front_repo_name=$(echo "$repo_url" | sed 's#.*/\([^/]*\)\.git#\1#')
|
||||||
front_directory="${REPO_DIRECTORY}/${front_repo_name}"
|
front_directory="${REPO_DIRECTORY}/${front_repo_name}"
|
||||||
if [[ -z "$WEBSITE_TOKEN" ]]; then
|
if [[ -z "$WEBSITE_TOKEN" ]]; then
|
||||||
|
|
@ -36,6 +40,10 @@ node --max-old-space-size=250 `which npm` run generate --prerender" www-data
|
||||||
cp -r "${front_directory}/.output/public" /var/www/html
|
cp -r "${front_directory}/.output/public" /var/www/html
|
||||||
chown -R www-data:www-data /var/www/html/public
|
chown -R www-data:www-data /var/www/html/public
|
||||||
|
|
||||||
|
if [[ -z "$CADDYFILE" ]]; then
|
||||||
|
CADDYFILE="/etc/caddy/Caddyfile"
|
||||||
|
fi
|
||||||
|
|
||||||
echo "www.${DOMAIN_NAME} {" >> $CADDYFILE
|
echo "www.${DOMAIN_NAME} {" >> $CADDYFILE
|
||||||
echo "redir ${DOMAIN_NAME}{uri} permanent" >> $CADDYFILE
|
echo "redir ${DOMAIN_NAME}{uri} permanent" >> $CADDYFILE
|
||||||
echo "}" >> $CADDYFILE
|
echo "}" >> $CADDYFILE
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue