Skip to content

Commit

Permalink
chore(deploy): api_list can use project env var
Browse files Browse the repository at this point in the history
  • Loading branch information
GeremWD committed Aug 21, 2023
1 parent e74209e commit 3a765f7
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
2 changes: 2 additions & 0 deletions BFF/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ FROM alpine:3.16

WORKDIR /bin

RUN apk update && apk add gettext

COPY --from=build /build/ogree-bff .
COPY --from=build /build/api.json .
COPY --from=build /build/swagger.json .
Expand Down
4 changes: 2 additions & 2 deletions deploy/docker/bff_api_list.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[
{"name":"server", "url": "http://ogree-core_arango_api:8080"},
{"name":"objects", "url": "http://ogree-core_api:3001"}
{"name":"server", "url": "http://${COMPOSE_PROJECT_NAME}_arango_api:8080"},
{"name":"objects", "url": "http://${COMPOSE_PROJECT_NAME}_api:3001"}
]
8 changes: 7 additions & 1 deletion deploy/docker/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -108,12 +108,18 @@ services:
- BFF_PORT=${BFF_PORT}
- BFF_SECRET=${AUTH_SECRET}
volumes:
- ${BFF_API_LIST}:/bin/api.json
- ${BFF_API_LIST}:/bin/api0.json
depends_on:
- ogree_api
- arango_api
ports:
- ${BFF_PORT}:${BFF_PORT}
entrypoint: >
sh -c "
export COMPOSE_PROJECT_NAME=${COMPOSE_PROJECT_NAME} &&
envsubst < /bin/api0.json > /bin/api.json &&
/bin/ogree-bff
"
volumes:
db:
Expand Down

0 comments on commit 3a765f7

Please sign in to comment.