Skip to content

Commit

Permalink
updated systemd service for node + svelte
Browse files Browse the repository at this point in the history
  • Loading branch information
ddxv committed Oct 22, 2023
1 parent 2415d6b commit 528e9f4
Show file tree
Hide file tree
Showing 4 changed files with 221 additions and 2 deletions.
214 changes: 214 additions & 0 deletions frontend/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"@skeletonlabs/skeleton": "^2.3.0",
"@skeletonlabs/tw-plugin": "^0.2.2",
"@sveltejs/adapter-auto": "^2.0.0",
"@sveltejs/adapter-node": "^1.3.1",
"@sveltejs/kit": "^1.20.4",
"@types/node": "^20.8.7",
"@typescript-eslint/eslint-plugin": "^6.0.0",
Expand Down
3 changes: 2 additions & 1 deletion frontend/svelte.config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import adapter from '@sveltejs/adapter-auto';
//import adapter from '@sveltejs/adapter-auto';
import adapter from '@sveltejs/adapter-node';
import { vitePreprocess } from '@sveltejs/kit/vite';

/** @type {import('@sveltejs/kit').Config} */
Expand Down
5 changes: 4 additions & 1 deletion scripts/app-store-frontend.service
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
[Unit]
Description=Gunicorn instance to serve frontend for App Store Dash
StartLimitBurst=3
StartLimitIntervalSec=30
After=network.target

[Service]
Expand All @@ -8,7 +10,8 @@ User=ubuntu
Group=ubuntu
RuntimeDirectory=gunicorn
WorkingDirectory=/home/ubuntu/app-store-dash/frontend
ExecStart=npm run preview
Environment=PORT=5001 NODE_ENV=production
ExecStart=/usr/local/bin/node /home/james/app-store-dash/frontend/build
ExecReload=/bin/kill -s HUP $MAINPID
Restart=on-failure
KillMode=mixed
Expand Down

0 comments on commit 528e9f4

Please sign in to comment.