Skip to content

Commit

Permalink
[ANCHOR-385]: Add documentation on how to pass JVM flags (#252)
Browse files Browse the repository at this point in the history
  • Loading branch information
Ifropc authored Oct 20, 2023
1 parent 0c3acc8 commit 842b6de
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions docs/anchoring-assets/anchor-platform/getting_started.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -329,6 +329,37 @@ When making requests to the Platform API, add a JWT signed by the secret defined

`PLATFORM_API_BASE_URL` uses `platform` instead of `localhost` as the host because you'll be making requests to the Platform API within the local network created by docker compose. When configuring your service in a staging or production environment, make sure to update your service urls.

### Passing JVM flags

Anchor Platform uses JVM to run. Sometimes, it's desired to change JVM flags to run the service. To do so, set environmental variable `JVM_FLAGS` to appropriate value

```bash
# dev.env
JVM_FLAGS="-Xms256m -Xmx2048m"
```

:::tip

If you need to pass environment variable from your machine to container, you should use `environment` compose option to set variables instead. Here's an example of using keystore from your local machine in the container:

```yaml
# docker-compose.yml
version: "3.8"
services:
sep-server:
image: stellar/anchor-platform:latest
command: --sep-server
env_file:
- ./dev.env
environment:
JVM_FLAGS: -Djavax.net.ssl.trustStore=/keystore.jks -Djavax.net.ssl.trustStorePassword=${KEYSTORE_PASSWORD}
volumes:
- ${KEYSTORE_LOCATION}:/keystore.jks
# ...
```

Where `KEYSTORE_LOCATION` is local keystore location and `KEYSTORE_PASSWORD` is local keystore password. :::

[sep-1]: https://github.com/stellar/stellar-protocol/blob/master/ecosystem/sep-0001.md
[sep-9]: https://github.com/stellar/stellar-protocol/blob/master/ecosystem/sep-0009.md
[sep-24]: https://github.com/stellar/stellar-protocol/blob/master/ecosystem/sep-0024.md
Expand Down

0 comments on commit 842b6de

Please sign in to comment.