Skip to content
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

Update anchor platform guide on flyway migrations #82

Merged
merged 4 commits into from
Feb 22, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 10 additions & 3 deletions docs/anchoring-assets/anchor-platform/sep24-user-guide.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ touch config/dev.assets.yaml

</CodeExample>

The first we'll need to do is specify which assets our Anchor Platform deployment supports.
The first thing we'll need to do is specify which assets our Anchor Platform deployment supports.

<CodeExample>

Expand Down Expand Up @@ -141,7 +141,7 @@ The information provided for the `assets` value closely maps to the information

### Publish a Stellar Info File

Next, let's enable applications to learn more about your service by hosting a `stellar.toml` file at a standardized URL path. This file allows applications to find information about your business, the assets your services utilize, as well as the root URL paths for these services. We can specify this file using the Anchor Platform.
Next, let's enable applications to learn more about your service by hosting a `stellar.toml` file at a standardized URL path. This file allows applications to find information about your business, the assets your services utilize, as well as the root URL paths for these services. We can host this file using the Anchor Platform.

Let's create a file called `dev.stellar.toml` file using the contents below as a starting point. For the full set of attributes, see the [SEP-1 specification][sep-1].

Expand Down Expand Up @@ -309,6 +309,8 @@ The demo wallet should be able to find your `stellar.toml` file, authenticate us

### Add Data Persistence

The Anchor Platform supports [PostgreSQL][postgresql] and [Aurora PostgreSQL][aurora-postgresql] for use in production, but also supports [H2][h2] or [SQLite][sqlite] for use in development. For managing migrations, the Anchor Platform uses [Flyway][flyway].

Before we move forward, let's add a database to our development environment so the transactions we initiate persist after stopping the service.

<CodeExample>
Expand Down Expand Up @@ -347,9 +349,9 @@ Now let's update our environment so the platform server can connect to the datab
DATA_TYPE=postgres
DATA_SERVER=db
DATA_DATABASE=platform
DATA_FLYWAY_ENABLED=false
SECRET_DATA_USERNAME=postgres
SECRET_DATA_PASSWORD=password
DATA_FLYWAY_ENABLED=true
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍


POSTGRES_USER=postgres
POSTGRES_PASSWORD=password
Expand Down Expand Up @@ -833,3 +835,8 @@ Let's make some additions to the `server.js` file so we can poll the Anchor Plat
[ap-default-values]: https://github.com/stellar/java-stellar-anchor-sdk/blob/develop/platform/src/main/resources/config/anchor-config-default-values.yaml
[stellar-demo-wallet]: https://demo-wallet.stellar.org
[stellar-lab]: https://laboratory.stellar.org/
[postgresql]: https://www.postgresql.org/
[aurora-postgresql]: https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/Aurora.AuroraPostgreSQL.html
[h2]: https://www.h2database.com/html/main.html
[sqlite]: https://www.sqlite.org/index.html
[flyway]: https://documentation.red-gate.com/fd/welcome-to-flyway-184127914.html