feat: enhance deployment process and server configuration
- Updated `deno.json` to allow environment variable access in the start task. - Added `deploy.sh` script for building and deploying the application to a remote server. - Modified `main.ts` to retrieve the `AUTH_SECRET` and `PORT` from environment variables. - Created `my-score.service` for managing the Deno service with systemd. - Cleaned up `user.ts` by removing unnecessary console logs.
This commit is contained in:
19
my-score.service
Normal file
19
my-score.service
Normal file
@@ -0,0 +1,19 @@
|
||||
[Unit]
|
||||
Description=My Score Deno Service
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
User=root
|
||||
WorkingDirectory=/home/media-backend
|
||||
Environment=PATH=/usr/local/bin:/usr/bin:/bin
|
||||
Environment=PORT=8000
|
||||
Environment=AUTH_SECRET=it-is-a-secret
|
||||
ExecStart=/usr/local/bin/deno run --allow-net --allow-read --allow-write --allow-env main.ts
|
||||
Restart=always
|
||||
RestartSec=10
|
||||
StandardOutput=journal
|
||||
StandardError=journal
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
Reference in New Issue
Block a user