Skip to content

Instantly share code, notes, and snippets.

@LuisCardenasSolis
Created May 30, 2024 23:43
Show Gist options
  • Save LuisCardenasSolis/7214ccee0f053272421670e971eb8dee to your computer and use it in GitHub Desktop.
Save LuisCardenasSolis/7214ccee0f053272421670e971eb8dee to your computer and use it in GitHub Desktop.
Service Linux for Astro web SSR with NVM
[Unit]
Description=Web Astro
After=network.target
[Service]
Environment=NODE_VERSION=20.13.1 NODE_ENV=production
WorkingDirectory=/var/www/astro-web
ExecStart=/root/.nvm/nvm-exec npm start
Restart=always
RestartSec=1s
[Install]
WantedBy=multi-user.target
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment