Skip to content

Commit 49500e6

Browse files
authored
Change env variable name for hostname and port (#859)
* Change env variable name for host * revert some dockerfile changes * remove in needed comment
1 parent 73611a4 commit 49500e6

File tree

7 files changed

+686
-9
lines changed

7 files changed

+686
-9
lines changed

.docker_env

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,5 @@ CADENCE_CLUSTERS_NAMES=cluster0
22
CADENCE_GRPC_PEERS="127.0.0.1:7833"
33
CADENCE_GRPC_SERVICES_NAMES=cadence-frontend
44
CADENCE_WEB_PORT=8088
5+
CADENCE_WEB_HOSTNAME=0.0.0.0
56
CADENCE_ADMIN_SECURITY_TOKEN=""

Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,11 @@ COPY . .
3535
# Uncomment the following line in case you want to disable telemetry during the build.
3636
ENV NEXT_TELEMETRY_DISABLED 1
3737
# optimize Build size by inclduding only required resources
38-
ENV NEXT_CONFIG_BUILD_OUTPUT standalone
3938

4039
RUN npm run generate:idl
4140
RUN npm run build
42-
41+
RUN npm run build-standalone
42+
RUN npm run post-build-standalone
4343

4444
# Production image, copy all the files and run next
4545
FROM base AS runner
@@ -68,4 +68,4 @@ COPY --from=builder --chown=nextjs:nodejs /app/.next/static ./.next/static
6868
USER nextjs
6969

7070

71-
CMD ["sh","-c", "CADENCE_WEB_PORT=${CADENCE_WEB_PORT:-8088} PORT=${CADENCE_WEB_PORT} exec node server.js"]
71+
CMD ["sh","-c", "CADENCE_WEB_PORT=${CADENCE_WEB_PORT:-8088} CADENCE_WEB_HOSTNAME=${CADENCE_WEB_HOSTNAME:-0.0.0.0} exec node server.js"]

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ Set these environment variables if you need to change their defaults
1919
| CADENCE_GRPC_SERVICES_NAMES | Comma-delimited list of gRPC services to call | cadence-frontend |
2020
| CADENCE_CLUSTERS_NAMES | Comma-delimited list of cluster names | cluster0 |
2121
| CADENCE_WEB_PORT | HTTP port to serve on | 8088 |
22+
| CADENCE_WEB_HOSTNAME | Host name to serve on | 0.0.0.0 |
2223
| CADENCE_ADMIN_SECURITY_TOKEN | Admin token for accessing admin methods | '' |
2324

2425
Note: To connect `cadence-web` to multiple clusters, you will need to add comma-delimted entries for `CADENCE_GRPC_PEERS`, `CADENCE_GRPC_SERVICES_NAMES` & `CADENCE_CLUSTERS_NAMES` for each cluster (each cluster values are grouped by their index within the Comma-delimited lists).

0 commit comments

Comments
 (0)