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