-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Adjustments to defaults, postgres docker example, minor fixes (#26
) * feat: Adjust interactive default prompts They are similar when keeping everything, and when choosing to modify and selecting all the default prompts (mainly changing gateway default) * feat: Support custom app branch names with slash Previously, the the app would fail to install due to file path issues, now it works. * Add docker postgres support via compose and update readme Only for local testing if you don't want to install postgres binaries. * Remove global npm install - Installing globally doesn't work with how the daemon start is currently implemented. Rather than fix that, prefer a local install. We don't need a global install. The test app brings its own node_modules folders and scripts to run ceramic/composedb, and this makes it easier to compare multiple versions.
- Loading branch information
Showing
9 changed files
with
66 additions
and
18 deletions.
There are no files selected for viewing
This file contains 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 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 |
---|---|---|
|
@@ -14,8 +14,7 @@ Please follow the instructions that follow. | |
|
||
Setup Ceramic and ComposeDB in a quick and easy fashion | ||
|
||
Wheel can handle "default" behavior for Ceramic and ComposeDB based on your network, or you can customize your | ||
configuration by stepping through some or all the available configuration options. | ||
Wheel can handle "default" behavior for Ceramic and ComposeDB based on your network, or you can customize your configuration by stepping through some or all the available configuration options. | ||
|
||
![](./gifs/running.gif) | ||
|
||
|
@@ -35,11 +34,17 @@ If you don't want to step through prompts at all, you can use wheel in "quiet" m | |
This requires you to have already setup a DID and [CAS Auth](#cas-auth). Please run `wheel --help` for more options. | ||
|
||
### CAS Auth | ||
|
||
All networks other than InMemory require CAS authorization. Wheel will walk you through setting up CAS authorization, but | ||
for more information see https://composedb.js.org/docs/0.4.x/guides/composedb-server/access-mainnet#step-1-start-your-node-and-copy-your-key-did. | ||
for more information read about [starting your node and copying your DID](https://composedb.js.org/docs/0.4.x/guides/composedb-server/access-mainnet#step-1-start-your-node-and-copy-your-key-did). | ||
|
||
## Setting up Postgres | ||
If using Postgres, it will need to be setup. Visit https://www.postgresql.org/download/ to install postgres. | ||
|
||
If using Postgres, it will need to be setup. *Note*: For production ceramic nodes, only postgres is supported. | ||
|
||
### Option 1: Local Install | ||
|
||
Visit <https://www.postgresql.org/download/> to install postgres locally. | ||
|
||
You will then need to configure postgres for ceramic. | ||
|
||
|
@@ -53,4 +58,16 @@ You will then need to configure postgres for ceramic. | |
|
||
The connection string you provide to wheel will then be `postgres://ceramic:[email protected]:5432/ceramic` | ||
|
||
*Note*: For production ceramic nodes, only postgres is supported. | ||
### Option 2: Using Docker | ||
|
||
For local development and testing, you can run a postgres in docker rather than installing a postgres server locally. The wheel defaults are to use sqlite, however, this is an option if you want to verify postgres indexing. It is not recommended to run a production node this way! This requires having [Docker](https://docs.docker.com/engine/install/) and [Docker compose](https://docs.docker.com/compose/install/) installed. You can read more about the [official Postgres image](https://www.docker.com/blog/how-to-use-the-postgres-docker-official-image/). | ||
|
||
Copy the [compose.yaml](https://github.com/ceramicstudio/wheel/blob/main/compose.yaml) file to your computer. You are welcome to change the values, but by default the connection string for wheel will be `postgres://ceramic:[email protected]:5432/ceramic`. Start the container: | ||
|
||
docker compose up -d | ||
|
||
To stop it | ||
|
||
docker compose down # include -v to delete the data | ||
|
||
Postgres data will be stored in the `./ceramic-data` folder using a docker volume. |
This file contains 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 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 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 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 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 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 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,15 @@ | ||
version: '3.1' | ||
|
||
services: | ||
db: | ||
image: postgres:16 | ||
container_name: ceramic-db | ||
restart: always | ||
environment: | ||
POSTGRES_USER: ceramic | ||
POSTGRES_PASSWORD: password | ||
DATABASE: ceramic | ||
volumes: | ||
- ./ceramic-pg-data:/var/lib/postgresql/data | ||
ports: | ||
- 5432:5432 |