You'll need a Caprover server setup.
Then create three apps for your Wasp app:
server
client
- Postgres DB
- go to one click apps/dbs and create a vanilla PostgreSQL
Set the container ports:
server
app ->3001
client
app ->8043
Enable HTTPS
and force redirects to HTTPS.
Adjust the captain-definition
location in the Deployment tab:
server
app ->captain-definition-server
client
app ->captain-definition-client
The env variables you will need to set:
server
appDATABASE_URL
(the DB you created on Caprover)postgres://postgres:<pw>@srv-captain--<db-app-name>:5432/postgres
WASP_WEB_CLIENT_URL
the client url (custom domain or the Caprover assigned subdomain)JWT_SECRET
client
appSERVER_APP_URL
the server url
Adding the following files to your Wasp app project:
captain-definition-client
captain-definition-server
caprover/Dockerfile.client
caprover/Dockerfile.server
.dockerignore
You'll need a new private-public SSH key pair to add to the client
and server
apps (private key) and to the Github repo as the deploy key (public key) ... or just add the public key to your account.
You should add the Github webhook URls as push only
to your Github repo (one for each client
and server
)
Set the SSL/TLS to Full (strict)
.
Change the A
recrod to DNS only
when you try to verify the domain (Clicking Enable HTTPS
tries to verify the domain and it fails if the A
record is proxied).
When you get a certificate for the domain, switch the A
recrod back to proxied.