-
Notifications
You must be signed in to change notification settings - Fork 9
Feat/coolify self host #37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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. | ||
|
||
<Warning> | ||
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. | ||
</Warning> | ||
|
||
|
||
## Deploying PowerSync on Coolify | ||
|
||
<Steps> | ||
<Step title="Add PowerSync service to project resources"> | ||
Add the PowerSync Service resource to your project by either scrolling through the `Services` section or by searching for `powersync` in the search bar. | ||
<Frame> | ||
<img src="/images/coolify/powersync_resource.png"/> | ||
</Frame> | ||
<Note> | ||
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. | ||
</Note> | ||
</Step> | ||
<Step title="Update environment variables"> | ||
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). | ||
<Frame> | ||
<img src="/images/coolify/powersync_env.png"/> | ||
</Frame> | ||
</Step> | ||
<Step title="Update config files"> | ||
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). | ||
<Frame> | ||
<img src="/images/coolify/powersync_storage.png"/> | ||
</Frame> | ||
<Note> | ||
You can expand the content by dragging the bottom right corner of the editor. | ||
<Frame> | ||
<img src="/images/coolify/expand_content.png"/> | ||
</Frame> | ||
</Note> | ||
* Update the `sync_rules.yaml` file: | ||
<Frame> | ||
<img src="/images/coolify/powersync_sync_rules.png"/> | ||
</Frame> | ||
* Update the `powersync.yaml` file: | ||
<Frame> | ||
<img src="/images/coolify/powersync_config.png"/> | ||
</Frame> | ||
</Step> | ||
<Step> | ||
Click on the `Deploy` button to deploy the PowerSync Service. | ||
<Frame> | ||
<img src="/images/coolify/powersync_deploy.png"/> | ||
</Frame> | ||
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. | ||
</Step> | ||
</Steps> | ||
|
||
## Environment Variables | ||
|
||
<table> | ||
<thead> | ||
<tr> | ||
<th>Environment Variable</th> | ||
<th>Description</th> | ||
<th>Example</th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
<tr> | ||
<td><code>POWERSYNC_CONFIG_PATH</code></td> | ||
<td>This is the path (inside the container) to the YAML config file</td> | ||
<td>/home/config/powersync.yaml</td> | ||
</tr> | ||
<tr> | ||
<td><code>PS_DATABASE_TYPE</code></td> | ||
<td>Database replication type</td> | ||
<td>postgresql</td> | ||
</tr> | ||
<tr> | ||
<td><code>PS_BACKEND_DATABASE_URI</code></td> | ||
<td>Database connection URI</td> | ||
<td>postgresql://postgres:postgres@localhost:5432/postgres</td> | ||
</tr> | ||
<tr> | ||
<td><code>PS_PORT</code></td> | ||
<td>The port the PowerSync API is accessible on</td> | ||
<td>8080</td> | ||
</tr> | ||
<tr> | ||
<td><code>PS_MONGO_URI</code></td> | ||
<td>The MongoDB URI used internally by the PowerSync Service</td> | ||
<td>mongodb://mongo:27017</td> | ||
</tr> | ||
<tr> | ||
<td><code>PS_JWKS_URL</code></td> | ||
<td>Auth URL</td> | ||
<td>http://localhost:6060/api/auth/keys</td> | ||
</tr> | ||
</tbody> | ||
</table> | ||
|
||
## Health checks | ||
|
||
For more information on checking the health of the PowerSync Service, see [Healthchecks](/self-hosting/lifecycle-maintenance/healthchecks). |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
MongDB and MySQL not supported in this version, or did we miss that?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From my understanding mongo is supported