Simple Node.js app demonstrating how to package for one-click deploys on self-hosted panels.
Each request increments a count that's stored on the local filesystem, which should persist between restarts; set the destination directory path via a DATA_DIRECTORY environment variable.
These panels maintain their own 'app catalogs' for one-click installs; until your app is included there, it will require more clicks to setup. Below are instructions for each platform so that you can test easily before submission.
Many of them also require publishing a Docker image somewhere to install. For simplicity the examples below uses pre-built images.
First clone the project locally:
git clone https://github.com/0dataapp/oneclick-proof
cd oneclick-proof
Then from the project directory, run the install command via the Cloudron CLI:
cloudron install --image 0data/oneclick-proof:cloudron --location oneclick-proof
Updates are also done from the project directory:
cloudron update --image 0data/oneclick-proof:cloudron --app oneclick-proof
See the packaging tutorial or Cloudron official packages for reference. You can also use Cloudron itself to build and as a registry.
- navigate to "Apps" → "Create A New App" → "One-Click Apps/Databases"
, then search for
>> TEMPLATE <<or scroll to bottom. - select the ">> TEMPLATE <<" app and paste the configuration from
caprover/compose.yml. - name your app as
oneclick-proofor something else, and then deploy.
- navigate to "Apps" → "Create A New App".
- check the box for "Has Persistent Data", name your app as
oneclick-proofor something else, and then click "Create New App". - navigate to your app settings, then "App Configs" → "Persistent Directories".
- set "Path in App" to
/usr/src/app/__localand "Label" tooneclick-proof-local; click "Save & Restart". - see the update command below to finalize.
To update an existing app: navigate to "Deployment", enter 0data/oneclick-proof:latest into "Deploy via ImageName", then click "Deploy".
You may want to enable "Force HTTPS by redirecting all HTTP traffic to HTTPS".
Other deployment methods, include uploading a .tar file and deploying code directly from your machine without publishing a Docker image via the Caprover CLI:
git clone https://github.com/0dataapp/oneclick-proof
cd oneclick-proof
caprover deploy
To update via the CLI using the last used configuration:
caprover deploy -d
More info on packaging and deployment:
- Captain Definition File
- Persistent Apps
- How to Run Docker Compose on CapRover
- Caprover official packages
Install by using the public Git repository:
- navigate to "Projects" → choose/create a project… → "Resources" → "+ New" → "Applications" → "Git Based" → "Public Repository"
- configure as follows:
-
Repository URL:
https://github.com/0dataapp/oneclick-proof/tree/master -
Build Pack:
Docker Compose -
Docker Compose Location:
/coolify/compose.yml
-
- select "Continue" and then, on the following "Configuration" page, click "Deploy".
- setup a domain under "Configuration" → "General" → "Domains" by entering something like
https://oneclick-proof.[your root domain]and clicking "Save", or make a random one by clicking "Generate Domain"; in case of SSL issues click "Redeploy".
Update by clicking "Redeploy" or "Advanced" → "Force deploy (without cache)" to pull from the Git repository.
More information: