Skip to content
This repository has been archived by the owner on Mar 16, 2024. It is now read-only.

Commit

Permalink
Remove address and port duplication (#59)
Browse files Browse the repository at this point in the history
we define port and address in the spec.

Signed-off-by: Bill Maxwell <[email protected]>
  • Loading branch information
cloudnautique authored Sep 26, 2023
1 parent fe67964 commit 0237f59
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
4 changes: 2 additions & 2 deletions rds/aurora/postgres/cluster/Acornfile
Original file line number Diff line number Diff line change
Expand Up @@ -157,8 +157,8 @@ localData: info: """
ports: publish: ["8080/http"]
env: {
PGDATABASE: "@{@{service.}pg.data.dbName}"
PGHOST: "@{@{service.}pg.data.address}"
PGPORT: "@{@{service.}pg.data.port}"
PGHOST: "@{@{service.}pg.address}"
PGPORT: "@{@{service.}pg.ports.5432}"
PGUSER: "@{@{service.}pg.secrets.admin.username}"
PGPASSWORD: "@{@{service.}pg.secrets.admin.password}"
}
Expand Down
4 changes: 2 additions & 2 deletions rds/aurora/postgres/cluster/examples/scratchpad/Acornfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ containers: scratchpad: {
consumes: ["db"]
env: {
PGDATABASE: "@{service.db.data.dbName}"
PGHOST: "@{service.db.data.address}"
PGPORT: "@{service.db.data.port}"
PGHOST: "@{service.db.address}"
PGPORT: "@{service.db.ports.5432}"
PGUSER: "@{service.db.secrets.admin.username}"
PGPASSWORD: "@{service.db.secrets.admin.password}"
}
Expand Down
4 changes: 1 addition & 3 deletions rds/scripts/service.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ services: rds: {
address: "${ADDRESS}"
ports: [${PORT}]
data: {
address: "${ADDRESS}"
port: "${PORT}"
dbName: "${DB_NAME}"
}
}
Expand All @@ -33,4 +31,4 @@ if [ -z "${DB_USERNAME}" ]; then
echo 'services: rds: secrets: ["admin"]' >> /run/secrets/output
else
echo 'services: rds: secrets: ["admin", "user"]' >> /run/secrets/output
fi
fi

0 comments on commit 0237f59

Please sign in to comment.