No video

Self-hosting SvelteKit with a VPS, Docker, CapRover and GitHub Actions

  Рет қаралды 3,933

Stanislav Khromov

Stanislav Khromov

Күн бұрын

Пікірлер: 32
@StanislavKhromov
@StanislavKhromov 10 ай бұрын
I got a question about how you would deploy a private GitHub repository with this approach as opposed to a public one. It's very easy - what you need to deploy a private repo is actually to log into the ghcr.io registry from your server. You can do this under Cluster > Docker Registries in CapRover admin panel. The username is your GitHub username and the password is a personal access token that has read:packages permission. You can read more here: docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-container-registry#authenticating-with-a-personal-access-token-classic
@AlphaKanalBiH
@AlphaKanalBiH 10 ай бұрын
This was exactly the tutorial I needed and I really appreciate how well you explained the concepts. It made it so easy to get the demo setup and running.
@friendliness1337
@friendliness1337 Жыл бұрын
This was super cool, thanks for the very informative video! I hadn't heard of CapRover before and it handles so many things I'd been running by myself in the past, this is going to save me so much time and pain!
@n0xQuZe
@n0xQuZe 5 ай бұрын
Awesome guide! Really needed this step by step tutorial. I will try deploying an eshop using a server from Hetzner using this guide.
@spookydascary1832
@spookydascary1832 3 ай бұрын
Great video, thanks a lot!! Made it much easier for me to deploy and enjoy the process!
@AmosNjorogeLeen
@AmosNjorogeLeen Жыл бұрын
Great stack. All what I need for my hobby project
@onz9950
@onz9950 7 ай бұрын
Amazing content thank you
@rubenuijtde
@rubenuijtde Жыл бұрын
Thanks a lot for this video!
@VolkerHochstein
@VolkerHochstein 3 ай бұрын
Thanks a lot for this video. Helped me a lot to deploy my first sveltekit application to caprover... I am using PRISMA as an ORM layer and I am wondering about the best strategy that Prisma migrations and clients are generated correctly as part of Deployments ?
@StanislavKhromov
@StanislavKhromov 3 ай бұрын
The easiest way is probably to modify your Dockerfile so that the CMD command first calls the Prisma migrate script and then starts the server. You can make a bash script that does both and invoke that instead of Node directly.
@mambodev
@mambodev Ай бұрын
Hi @StanislavKhromov ,I'm having trouble getting my drizzle kit migrate command to work. Any advice?
@StanislavKhromov
@StanislavKhromov Ай бұрын
Run the migration in the npm start command so it runs when the container starts. Instead of `node build/index` your command would look like `npm run migrate && node build/index`
@abirmuhtasim3697
@abirmuhtasim3697 3 ай бұрын
If Im gonno run only one app in the vps, do I need caprover?
@StanislavKhromov
@StanislavKhromov 3 ай бұрын
CapRover is still useful for one app because it provides SSL certificates and an easy way to deploy new changes via GitHub Actions. So I'd it's still useful to have & very easy to add more apps whenever you want.
@user-sy9xb4jy9y
@user-sy9xb4jy9y 9 ай бұрын
Hi. Thank you for your work. Have you tried using instead 'matootie/github-docker@v3.1.0 ' in its workflows file 'docker/build-push-action'. Is there an error about the outdated 'set-output' command now during deployment?
@StanislavKhromov
@StanislavKhromov 9 ай бұрын
I've only used `matootie/github-docker` so far. Feel free to try the `docker/build-push-action` action, it should work as a replacement and hopefully it will solve any deprecation warnings. If you get it to work you are welcome to contribute back the solution!
@tecee1697
@tecee1697 Ай бұрын
I am getting 502 error after deploying it ... not sure how to debug it
@mambodev
@mambodev Ай бұрын
I encountered the same error. Try changing the port from the default to the one shown in the logs. For me, it was 3000.
@tecee1697
@tecee1697 Ай бұрын
@@mambodev where to check the log..no idea never used docker container and caprover before...
@StanislavKhromov
@StanislavKhromov Ай бұрын
@@tecee1697 You can see your apps logs under Deployment tab -> App logs (just under the list of deployments)
@tecee1697
@tecee1697 Ай бұрын
@@StanislavKhromov thanks all i see in log is this : 2024-07-18T05:41:01.693622877Z /
@StanislavKhromov
@StanislavKhromov Ай бұрын
If you're using SvelteKit with adapter-node it should be port 3000, if you're using a different framework, refer to their guide for the correct port and make sure to set the correct port in EXPOSE inside the Dockerfile as well
@mrhell2863
@mrhell2863 9 ай бұрын
I did everything according to the instructions, the application has been downloaded, but at the application address: nginx error 502.
@StanislavKhromov
@StanislavKhromov 9 ай бұрын
That usually means your SvelteKit app didn't start properly. Go to the Svelte apps Deployment tab i CapRover and under App Logs check if there are any errors. Good luck!
@funnynews341
@funnynews341 10 ай бұрын
with docker, does it make vps slower?
@StanislavKhromov
@StanislavKhromov 10 ай бұрын
No, Docker is not virtualization, it's just a way to run programs in a separate namespace. The performance is the same.
@MrRe-sj2iv
@MrRe-sj2iv 7 ай бұрын
Can you please demo how to use Caprover Environment variables while building docker image?
@StanislavKhromov
@StanislavKhromov 7 ай бұрын
Hi, you can see usage of environment variables in the last section where we add a PostgreSQL database to our app!
@scott_itall8638
@scott_itall8638 11 ай бұрын
Pocketbase?
@StanislavKhromov
@StanislavKhromov 11 ай бұрын
Hey Scott. Sure, you can host PocketBase using CapRover if you'd like, there is even a "One click app" for it!
@pss_crs
@pss_crs Жыл бұрын
isn't good to make docker special user instead of using the root user then only the give permissions it needs. btw this stack is 👌.
@StanislavKhromov
@StanislavKhromov Жыл бұрын
Hi! Yes, you can add `USER node` in the last stage of the Docker image to run the app as a non-root user!
Coolify Crash Course | Self Host 101 | Secure Set up
1:29:06
❌Разве такое возможно? #story
01:00
Кэри Найс
Рет қаралды 3,7 МЛН
Little brothers couldn't stay calm when they noticed a bin lorry #shorts
00:32
Fabiosa Best Lifehacks
Рет қаралды 20 МЛН
Can This Bubble Save My Life? 😱
00:55
Topper Guild
Рет қаралды 86 МЛН
Coding Will Never Be The Same | Cursor + Claude 3.5 sonnet
18:54
Tech Overseas
Рет қаралды 20 М.
Add extra server to Coolify
10:34
360Creators
Рет қаралды 7 М.
The Free and Open Source Software I Use in 2024 - Part 1
28:31
Awesome Open Source
Рет қаралды 235 М.
Let's learn GitHub Actions in a self-hosted Homelab!
23:53
Christian Lempa
Рет қаралды 39 М.
Frontiers By Paradigm Day 1
3:51:21
Paradigm
Рет қаралды 2,7 М.
Ansible Full Course | Zero to Hero
3:22:56
Rahul Wagh
Рет қаралды 44 М.
❌Разве такое возможно? #story
01:00
Кэри Найс
Рет қаралды 3,7 МЛН