Skip to content

Commit 3a765f7

Browse files
committed
chore(deploy): api_list can use project env var
1 parent e74209e commit 3a765f7

File tree

3 files changed

+11
-3
lines changed

3 files changed

+11
-3
lines changed

BFF/Dockerfile

+2
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ FROM alpine:3.16
2020

2121
WORKDIR /bin
2222

23+
RUN apk update && apk add gettext
24+
2325
COPY --from=build /build/ogree-bff .
2426
COPY --from=build /build/api.json .
2527
COPY --from=build /build/swagger.json .

deploy/docker/bff_api_list.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
[
2-
{"name":"server", "url": "http://ogree-core_arango_api:8080"},
3-
{"name":"objects", "url": "http://ogree-core_api:3001"}
2+
{"name":"server", "url": "http://${COMPOSE_PROJECT_NAME}_arango_api:8080"},
3+
{"name":"objects", "url": "http://${COMPOSE_PROJECT_NAME}_api:3001"}
44
]

deploy/docker/docker-compose.yml

+7-1
Original file line numberDiff line numberDiff line change
@@ -108,12 +108,18 @@ services:
108108
- BFF_PORT=${BFF_PORT}
109109
- BFF_SECRET=${AUTH_SECRET}
110110
volumes:
111-
- ${BFF_API_LIST}:/bin/api.json
111+
- ${BFF_API_LIST}:/bin/api0.json
112112
depends_on:
113113
- ogree_api
114114
- arango_api
115115
ports:
116116
- ${BFF_PORT}:${BFF_PORT}
117+
entrypoint: >
118+
sh -c "
119+
export COMPOSE_PROJECT_NAME=${COMPOSE_PROJECT_NAME} &&
120+
envsubst < /bin/api0.json > /bin/api.json &&
121+
/bin/ogree-bff
122+
"
117123
118124
volumes:
119125
db:

0 commit comments

Comments
 (0)