These are the files that you need to make this work:
- Dockerfile
- .github/workflows/deploy.yml
- captain-definition
- default.conf
Go to settings -> Secrets and variables -> actions
Add the following secrets
CAPROVER_SERVER
- The server url of your caprover instance. This must be in the format ofhttps://caprover.example.com
CAPROVER_NAME
- The name of the app you want to deploy toCAPROVER_KEY
- The key of the app you want to deploy to
- Set up a caprover instance
- Make sure you have a domain name pointing to the server
- Take the domain name and set it as the
CAPROVER_SERVER
secret in the format ofhttps://caprover.example.com
- Create a new app
- Set the app name to the same as the
CAPROVER_NAME
secret
- After creating the app, go to
Method 1: Official CLI
- Click
Enable App Token
- Take the token and set it as the
CAPROVER_KEY
secret
You can find the workflow file in .github/workflows/deploy.yml
The docker file is located in Dockerfile
and simply takes the built files from github's build and serves them on port 80
If the built files are not in ./dist
then you will need to change the COPY
command in the dockerfile to match the location of your built files
- Go to
.github/workflows/deploy.yml
and change thedist
to match the name of your built folder - Go to
Dockerfile
and change thedist
to match the name of your built folder