Skip to content

Commit

Permalink
storage-service: rename PORT and RPC env vars
Browse files Browse the repository at this point in the history
  • Loading branch information
georgimld committed May 31, 2022
1 parent c998e0c commit 9ad01f9
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 13 deletions.
6 changes: 3 additions & 3 deletions storage-service/.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ ORGANIZATION=KfW
ORGANIZATION_VAULT_SECRET=secret

# blockchain
RPC_PORT=8000
RPC_HOST=localhost
RPC_PASSWORD=s750SiJnj50yIrmwxPnEdSzpfGlTAHzhaUwgqKeb0G1j
MULTICHAIN_RPC_PORT=8000
MULTICHAIN_RPC_HOST=localhost
MULTICHAIN_RPC_PASSWORD=s750SiJnj50yIrmwxPnEdSzpfGlTAHzhaUwgqKeb0G1j

# api
ROOT_SECRET=root-secret
Expand Down
2 changes: 1 addition & 1 deletion storage-service/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ all services.
| Env Variable | Default Value | Description |
| --------------------------- | ------------- | ----------------------------------------------------------------------------------------------- |
| STORAGE_SERVICE_HOST | localhost | IP address of storage service |
| STORAGE_SERVICE_PORT | 8090 | Port of storage service |
| PORT | 8090 | The port used to expose the storage service |
| ACCESS_CONTROL_ALLOW_ORIGIN | "\*" | CORS configuration |
| MINIO_ACCESS_KEY | minio | Access key for Minio server |
| MINIO_SECRET_KEY | minio123 | Secret (Password) for Minio server |
Expand Down
16 changes: 8 additions & 8 deletions storage-service/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ services:
build:
context: ../blockchain
environment:
RPC_HOST: ${RPC_HOST}
RPC_PORT: ${RPC_PORT}
RPC_PASSWORD: ${RPC_PASSWORD}
MULTICHAIN_RPC_HOST: ${MULTICHAIN_RPC_HOST}
MULTICHAIN_RPC_PORT: ${MULTICHAIN_RPC_PORT}
MULTICHAIN_RPC_PASSWORD: ${MULTICHAIN_RPC_PASSWORD}
ORGANIZATION: ${ORGANIZATION}
ports:
- ${RPC_PORT}:${RPC_PORT}
- ${MULTICHAIN_RPC_PORT}:${MULTICHAIN_RPC_PORT}
- "8085:8085"

api:
Expand All @@ -18,10 +18,10 @@ services:
environment:
ORGANIZATION: ${ORGANIZATION}
ORGANIZATION_VAULT_SECRET: ${ORGANIZATION_VAULT_SECRET}
RPC_HOST: blockchain
RPC_PORT: ${RPC_PORT}
MULTICHAIN_RPC_HOST: blockchain
MULTICHAIN_RPC_PORT: ${MULTICHAIN_RPC_PORT}
ROOT_SECRET: ${ROOT_SECRET}
RPC_PASSWORD: ${RPC_PASSWORD}
MULTICHAIN_RPC_PASSWORD: ${MULTICHAIN_RPC_PASSWORD}
DOCUMENT_FEATURE_ENABLED: ${DOCUMENT_FEATURE_ENABLED}
STORAGE_SERVICE_EXTERNAL_URL: ${STORAGE_SERVICE_EXTERNAL_URL}
STORAGE_SERVICE_HOST: storage
Expand Down Expand Up @@ -65,7 +65,7 @@ services:
build:
context: .
environment:
STORAGE_SERVICE_PORT: ${STORAGE_SERVICE_PORT}
PORT: ${STORAGE_SERVICE_PORT}
ACCESS_CONTROL_ALLOW_ORIGIN: ${ACCESS_CONTROL_ALLOW_ORIGIN}
MINIO_ACCESS_KEY: ${MINIO_ACCESS_KEY}
MINIO_SECRET_KEY: ${MINIO_SECRET_KEY}
Expand Down
2 changes: 1 addition & 1 deletion storage-service/src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ interface Config {

const config: Config = {
host: process.env.STORAGE_SERVICE_HOST || "localhost",
port: Number(process.env.STORAGE_SERVICE_PORT) || 8090,
port: Number(process.env.PORT) || 8090,
allowOrigin: process.env.ACCESS_CONTROL_ALLOW_ORIGIN || "*",
storage: {
accessKey: process.env.MINIO_ACCESS_KEY || "minio",
Expand Down

0 comments on commit 9ad01f9

Please sign in to comment.