Dedicated server deployment
How to deploy wasp on bare metal (Ubuntu) server?
I have a dedicated server which I use for different experiments, is there any guide on how to deploy my app not on popular providers like fly.io or netlify, but on my dedicated server?
11 Replies
Wohooo @Artomatica, you just became a Waspeteer level 3!
You need Docker on your machine, wasp generates docker images one for the client and one for the backend so you can host them anywhere you want. Fly or netlify are just platforms with built-in deploy support
Thanks, what about domain setup, things like ngnix, etc.? Should I add ngnix to wasp Docker? Sorry for stupid questions, I develop for embedded and never deployed web apps with Docker.
I'll share a guide later, I've deployed Wasp to my server ๐
I am experementing with docker compose,
Somethimg like this
services:
wasp-app:
image: wasp-app-image
ports:
- "3000:3000"
nginx:
image: nginx:latest
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf
ports:
- "80:80"
- "443:443"
You need 1 Dockerfile for server, 1 for client ๐
This piece of docs should be most helpful: https://wasp-lang.dev/docs/advanced/deployment/manually .
As for the deatils of how to set up domain and similar -> that will be also dependant on your machine and your setup.
In general, what you get generated by
wasp build
is:
1. static files for client.
2. dockerfile for server.
So you need to deploy those somewhere, while providing them with correct ENV vars so they know how to speak to each other.
You will also need a postgres DB that server will connect to, which you can also host on your own or use one of the hosting providers.@Artomatica I've used https://caprover.com/ to manage my server (it's a platform as a service that you put on your server and you get something like your own Heroku)
I've used the following script to deploy my Wasp app there:
CapRover ยท Free and Open Source PaaS!
Free and Open Source PaaS!
The most interesting part is probably the fact that I add a
Dockerfile
for the client:
Nice, thank you, @miho. Will give it a go in the evening. I have two free Oracle instances which just sitting around doing nothing.
Copcover is amazing! Thanks for the info! Paired with always free oracle cloud there is no excuses not to deploy apps anymore.
Nice man, I'm glad you found it useful ๐๐ผ it was always my dream to find a way to get the paid services experience on my hardware