Skip to content

Commit

Permalink
fix frontend
Browse files Browse the repository at this point in the history
  • Loading branch information
soniasingla committed Jul 29, 2024
1 parent fa3fab6 commit d39b0e0
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
7 changes: 5 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ version: '3.8'

services:
backend:
build:
build:
context: ./backend
dockerfile: Dockerfile
ports:
Expand All @@ -12,13 +12,16 @@ services:
- shardeum-network

frontend:
build:
build:
context: ./frontend
dockerfile: Dockerfile
ports:
- "3000:3000"
depends_on:
- backend
environment:
NEXT_PUBLIC_PROMETHEUS_URL_RANGE: "http://backend:9090/api/v1/query_range"
NEXT_PUBLIC_PROMETHEUS_URL: "http://localhost:9090/api/v1/query?query=Shardeum"
networks:
- shardeum-network

Expand Down
4 changes: 4 additions & 0 deletions frontend/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ WORKDIR /app
COPY --from=deps /app/node_modules ./node_modules
COPY . .

# Set environment variable
ENV NEXT_PUBLIC_PROMETHEUS_URL_RANGE="http://backend:9090/api/v1/query_range"
ENV NEXT_PUBLIC_PROMETHEUS_URL="http://localhost:9090/api/v1/query?query=Shardeum"

# Uncomment the following line in case you want to disable telemetry during the build.
# ENV NEXT_TELEMETRY_DISABLED 1

Expand Down

0 comments on commit d39b0e0

Please sign in to comment.