diff --git a/images/coolify/expand_content.png b/images/coolify/expand_content.png new file mode 100644 index 00000000..4e9dc775 Binary files /dev/null and b/images/coolify/expand_content.png differ diff --git a/images/coolify/powersync_config.png b/images/coolify/powersync_config.png new file mode 100644 index 00000000..e0eb5f50 Binary files /dev/null and b/images/coolify/powersync_config.png differ diff --git a/images/coolify/powersync_deploy.png b/images/coolify/powersync_deploy.png new file mode 100644 index 00000000..8e2ac8d4 Binary files /dev/null and b/images/coolify/powersync_deploy.png differ diff --git a/images/coolify/powersync_env.png b/images/coolify/powersync_env.png new file mode 100644 index 00000000..54d34174 Binary files /dev/null and b/images/coolify/powersync_env.png differ diff --git a/images/coolify/powersync_resource.png b/images/coolify/powersync_resource.png new file mode 100644 index 00000000..6ecd097b Binary files /dev/null and b/images/coolify/powersync_resource.png differ diff --git a/images/coolify/powersync_storage.png b/images/coolify/powersync_storage.png new file mode 100644 index 00000000..64333ef7 Binary files /dev/null and b/images/coolify/powersync_storage.png differ diff --git a/images/coolify/powersync_sync_rules.png b/images/coolify/powersync_sync_rules.png new file mode 100644 index 00000000..b505dae6 Binary files /dev/null and b/images/coolify/powersync_sync_rules.png differ diff --git a/mint.json b/mint.json index d0b42630..725c1944 100644 --- a/mint.json +++ b/mint.json @@ -338,10 +338,16 @@ "self-hosting/getting-started", { "group": "Installation", - "pages": [ + "pages": [{ + "group": "Powersync-service", + "pages": [ + "self-hosting/installation/powersync-service-setup", + "self-hosting/installation/coolify" + ] + }, "self-hosting/installation", "self-hosting/installation/database-setup", - "self-hosting/installation/powersync-service-setup", + "self-hosting/installation/client-side-setup", "self-hosting/installation/app-backend-setup" ] diff --git a/self-hosting/installation/coolify.mdx b/self-hosting/installation/coolify.mdx new file mode 100644 index 00000000..9c8007c6 --- /dev/null +++ b/self-hosting/installation/coolify.mdx @@ -0,0 +1,118 @@ +--- +title: "Coolify" +description: "Configuration details for deploying the PowerSync Service on Coolify" +--- + +[Coolify](https://coolify.io/) is an open-source, self-hosted platform that simplifies the deployment and management of applications, databases, and services on your own infrastructure. +Think of it as a self-hosted alternative to platforms like Heroku or Netlify. + + + Before deploying the Powersync Service on Coolify, it is highly recommended to read through the [PowerSync Service Setup](/self-hosting/installation/powersync-service-setup) + guide to understand the requirements and configuration options. + + + +## Deploying PowerSync on Coolify + + + + Add the PowerSync Service resource to your project by either scrolling through the `Services` section or by searching for `powersync` in the search bar. + + + + + The default one-click deployable PowerSync Service uses + * MongoDB for internal storage, + * PostgreSQL for replication, and + * [Sync Rules](/usage/sync-rules) as defined for the To-Do List demo application found in [Demo Apps / Example Projects](/resources/demo-apps-example-projects). + + If you are running the demo To-Do List application, you can jump to Step 4 and simply deploy the PowerSync Service. + + + + Navigate to the `Environment Variables` tab and update the environment variables as per your requirements. For more information on what environment variables are available, see + [Environment Variables](/self-hosting/installation/coolify#environment-variables). + + + + + + Navigate to the `Storages` tab and update the `sync_rules.yaml` and `powersync.yaml` files as needed. + For more information see [Sync Rules](/usage/sync-rules) and + the skeleton config file in [PowerSync Service Setup](/self-hosting/installation/powersync-service-setup). + + + + + You can expand the content by dragging the bottom right corner of the editor. + + + + + * Update the `sync_rules.yaml` file: + + + + * Update the `powersync.yaml` file: + + + + + + Click on the `Deploy` button to deploy the PowerSync Service. + + + + The PowerSync Service will now be available at + * `http://localhost:8080` if default config was used, or + * `http://{your_coolify_domain}:{PS_PORT}` if a custom domain or port was specified. + + + +## Environment Variables + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Environment VariableDescriptionExample
POWERSYNC_CONFIG_PATHThis is the path (inside the container) to the YAML config file/home/config/powersync.yaml
PS_DATABASE_TYPEDatabase replication typepostgresql
PS_BACKEND_DATABASE_URIDatabase connection URIpostgresql://postgres:postgres@localhost:5432/postgres
PS_PORTThe port the PowerSync API is accessible on8080
PS_MONGO_URIThe MongoDB URI used internally by the PowerSync Servicemongodb://mongo:27017
PS_JWKS_URLAuth URLhttp://localhost:6060/api/auth/keys
+ +## Health checks + +For more information on checking the health of the PowerSync Service, see [Healthchecks](/self-hosting/lifecycle-maintenance/healthchecks).