deploy nuxt caddy
This commit is contained in:
		
							
								
								
									
										10
									
								
								install.sh
									
									
									
									
									
								
							
							
						
						
									
										10
									
								
								install.sh
									
									
									
									
									
								
							@@ -322,6 +322,7 @@ echo -e "${PURPLE}${BOLD}Install the front-end ? (y/N) ${RESET}"
 | 
			
		||||
read answer
 | 
			
		||||
if [[ "$answer" == "y" ]]; then
 | 
			
		||||
    get_username
 | 
			
		||||
    get_ip
 | 
			
		||||
 | 
			
		||||
    echo -e "${PURPLE}${BOLD}Create and push a prod branch on the repo${RESET}"
 | 
			
		||||
    echo -e "${PURPLE}git checkout -b prod${RESET}"
 | 
			
		||||
@@ -350,6 +351,15 @@ if [[ "$answer" == "y" ]]; then
 | 
			
		||||
    tmux send-keys -t front \"cd /home/${username}/${front_folder} && node .output/server/index.mjs\" C-m &&\
 | 
			
		||||
    tmux send-keys -t directus "npx directus start" C-m" $username
 | 
			
		||||
 | 
			
		||||
    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 "}" >> $caddyfile
 | 
			
		||||
    caddy fmt $caddyfile -w
 | 
			
		||||
    caddy reload -c $caddyfile
 | 
			
		||||
 | 
			
		||||
    echo -e "${PURPLE}${BOLD}Setup a webhook ? (y/N) ${RESET}"
 | 
			
		||||
    read answer
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user