nuxt generate 1
This commit is contained in:
parent
b98459e839
commit
c8fb3d5ce9
|
@ -46,6 +46,10 @@ On a fresh install as root user using
|
||||||
|
|
||||||
## Post-install
|
## Post-install
|
||||||
|
|
||||||
|
0. Delete unix Debian account
|
||||||
|
|
||||||
|
`userdel --remove-home debian`
|
||||||
|
|
||||||
1. Configure DNS Zone
|
1. Configure DNS Zone
|
||||||
```
|
```
|
||||||
Domain : <domain_name> | Type : A | Target : <ip>
|
Domain : <domain_name> | Type : A | Target : <ip>
|
||||||
|
|
21
install.sh
21
install.sh
|
@ -390,8 +390,7 @@ if [[ "$answer" == "y" ]]; then
|
||||||
get_ip
|
get_ip
|
||||||
|
|
||||||
echo -e "${PURPLE}${BOLD}Create and push a prod branch on the repo${RESET}"
|
echo -e "${PURPLE}${BOLD}Create and push a prod branch on the repo${RESET}"
|
||||||
echo -e "${BLUE}git checkout -b prod${RESET}"
|
echo -e "${BLUE}git fetch . main:prod${RESET}"
|
||||||
echo -e "${BLUE}git add . && git commit -m "first commit to prod"${RESET}"
|
|
||||||
echo -e "${BLUE}git push origin prod${RESET}"
|
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
|
||||||
|
@ -408,6 +407,9 @@ if [[ "$answer" == "y" ]]; then
|
||||||
echo "telemetry.enabled=false" >> /var/www/.nuxtrc
|
echo "telemetry.enabled=false" >> /var/www/.nuxtrc
|
||||||
chown -R www-data:www-data /var/www/.nuxtrc
|
chown -R www-data:www-data /var/www/.nuxtrc
|
||||||
|
|
||||||
|
rm /var/www/html/*
|
||||||
|
chown www-data:www-data /var/www/html
|
||||||
|
|
||||||
su -s /bin/bash -c "cd ${repo_directory} &&\
|
su -s /bin/bash -c "cd ${repo_directory} &&\
|
||||||
git clone ${repo_url} &&\
|
git clone ${repo_url} &&\
|
||||||
cd ${front_directory} &&\
|
cd ${front_directory} &&\
|
||||||
|
@ -417,17 +419,17 @@ if [[ "$answer" == "y" ]]; then
|
||||||
echo \"DIRECTUS_URL=https://cms.${domain_name}\" >> .env &&\
|
echo \"DIRECTUS_URL=https://cms.${domain_name}\" >> .env &&\
|
||||||
tmux send-keys -t directus C-c &&\
|
tmux send-keys -t directus C-c &&\
|
||||||
npm install -y &&\
|
npm install -y &&\
|
||||||
NUXT_TELEMETRY_DISABLED=1 bash -c \"npm run build\" &&\
|
npm run generate --prerender" www-data
|
||||||
tmux new-session -d -s front &&\
|
|
||||||
tmux send-keys -t front \"cd ${front_directory} && node .output/server/index.mjs\" C-m &&\
|
cp -r "${front_directory}/.output/public" /var/www/html
|
||||||
tmux send-keys -t directus \"npx directus start\" C-m" www-data
|
|
||||||
|
|
||||||
caddyfile="/etc/caddy/Caddyfile"
|
caddyfile="/etc/caddy/Caddyfile"
|
||||||
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
|
||||||
echo "${domain_name} {" >> $caddyfile
|
echo "${domain_name} {" >> $caddyfile
|
||||||
echo "reverse_proxy ${ip}:3000" >> $caddyfile
|
echo "root * /var/www/html/public" >> $caddyfile
|
||||||
|
echo "file_server" >> $caddyfile
|
||||||
echo "}" >> $caddyfile
|
echo "}" >> $caddyfile
|
||||||
caddy fmt $caddyfile -w
|
caddy fmt $caddyfile -w
|
||||||
caddy reload -c $caddyfile
|
caddy reload -c $caddyfile
|
||||||
|
@ -475,12 +477,11 @@ apt purge expect
|
||||||
|
|
||||||
# TODO
|
# TODO
|
||||||
#
|
#
|
||||||
# ZABBIX
|
|
||||||
# URBACKUP
|
|
||||||
# DIRECTUS EMAIL
|
# DIRECTUS EMAIL
|
||||||
# DIRECTUS REDIS
|
# DIRECTUS REDIS
|
||||||
# LOGING DE TOUT
|
# LOGING DE TOUT
|
||||||
# IMPORT DIRECTUS FULL DB
|
|
||||||
# CADDYFILE EN JSON
|
# CADDYFILE EN JSON
|
||||||
# MÀJ
|
# MÀJ
|
||||||
# reboot a running system
|
# reboot a running system
|
||||||
|
# MATOMO
|
||||||
|
# NODE EXPORTER
|
Loading…
Reference in New Issue