Looking to deploy Deno Fresh on VPS using port 443
Hello! I have two questions,
I used saaskit as a base. However fresh's start function is using
serve()
and not serveTls()
. The problem is I cannot expose on 443 since I can't provide certificate and key as start options. Any advice? Should I write a custom start function?
My second question is about continuous deployment: I have setup a gitlab runner on my VPS that handles the process of running on each new commit, but unlike NPM, the deno runtime is "listening" and the pipeline stays in "running" state. Is there any solution to this?
Thank you!6 Replies
You can use a reverse proxy like Nginx to point your 443 to your project port
config like this should do
Thanks a lot! lemme try...
I just stumbled upon your previous post, so I will try to resolve the second problem using a daemon and post the CI/CD script here
It worked! Installed nginx, bought a cheap 5 years certificate and added it to the VPS, now my website is accessible using https! <:party_deno:1035517691517218847>
I also found a way to fix my CI/CD issues, and I think it can be of general interest
I created this simple C program that daemonizes a bash command so it can exit the CI/CD pipeline correctly. just run the following command
Here is my
gitlab-ci.yml
continuous deployment script
I hope it can be useful to someone, I'll put this short daemonize program on my gitlab!yep will definitely be useful
I personally just use webhooks for CD
may i ask how do you use webhooks for your cd?
I'm lazy with a lot of stuff so
Servers receives a request on push and manually runs
git pull
and systemctl restart xxx.service
could have done that lol