@comapeo/cloud
v0.1.0
Published
self-hosted cloud server for CoMapeo
Downloads
180
Keywords
Readme
@comapeo/cloud
A self-hosted cloud server for CoMapeo.
Deploying CoMapeo Cloud
CoMapeo Cloud comes with a Dockerfile
that can be used to build a Docker image. This image can be used to deploy CoMapeo Cloud on a server.
Server configuration is done using environment variables. The following environment variables are available:
| Environment Variable | Required | Description | Default Value |
| --------------------- | -------- | -------------------------------------------------------------------- | ---------------- |
| SERVER_BEARER_TOKEN
| Yes | Token for authenticating API requests. Should be large random string | |
| PORT
| No | Port on which the server runs | 8080
|
| SERVER_NAME
| No | Friendly server name, seen by users when adding server | CoMapeo Server
|
| ALLOWED_PROJECTS
| No | Number of projects allowed to register with the server | 1
|
| STORAGE_DIR
| No | Path for storing app & project data | $CWD/data
|
Deploying with fly.io
CoMapeo Cloud can be deployed on fly.io using the following steps:
- Install the flyctl CLI tool by following the instructions here.
- Create a new app on fly.io by running
flyctl apps create
, take a note of the app name. - Set the SERVER_BEARER_TOKEN secret via:
flyctl secrets set SERVER_BEARER_TOKEN=<your-secret> --app <your-app-name>
- Deploy the app by running (optionally setting the
ALLOWED_PROJECTS
environment variable):flyctl deploy --app <your-app-name> -e ALLOWED_PROJECTS=10
- The app should now be running on fly.io. You can access it at
https://<your-app-name>.fly.dev
.
To destroy the app (delete all data and project invites), run:
[!WARNING] This action is irreversible and will permanently delete all data associated with the app, and projects that have already added the server will no longer be able to sync with it.
flyctl destroy --app <your-app-name>