Skip to content

Commit 71a6f18

Browse files
authored
Allow customization of default route in container (#1899)
* BASE_URL no longer needed * Allow customization of default route in container * Shouldn't need the single quotes
1 parent 3f407ac commit 71a6f18

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/Container/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,15 @@ LABEL org.opencontainers.image.title="ServicePulse" \
2222

2323
ENV SERVICECONTROL_URL="http://localhost:33333/api/"
2424
ENV MONITORING_URLS="['http://localhost:33633/']"
25-
ENV BASE_URL="/"
25+
ENV DEFAULT_ROUTE="/dashboard"
2626

2727
COPY /src/ServicePulse.Host/app /usr/share/nginx/html
2828

2929
RUN mv /usr/share/nginx/html/js/app.constants.js /usr/share/nginx/html/js/app.constants.template &&\
3030
sed -i \
3131
-e "s,http://localhost:33333/api/,\$SERVICECONTROL_URL,g" \
3232
-e "s,\['http://localhost:33633/'\],\$MONITORING_URLS,g" \
33-
-e "s,'/','\$BASE_URL',g" \
33+
-e "s,/dashboard,\$DEFAULT_ROUTE,g" \
3434
/usr/share/nginx/html/js/app.constants.template
3535

3636
ADD /src/Container/nginx.conf /etc/nginx/

src/Container/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ docker run -p 9090:90 particular/servicepulse:latest
1414

1515
- **`SERVICECONTROL_URL`**: _Default_: `http://localhost:33333/api/`. The url to your ServiceControl instance
1616
- **`MONITORING_URLS`**: _Default_: `['http://localhost:33633/']`. A JSON array of URLs to your monitoring instances
17-
- **`BASE_URL`**: _Default_ `'/'`. The base path to your ServicePulse install, for reverse proxy installations.
17+
- **`DEFAULT_ROUTE`**: _Default_: `/dashboard`. The default page that should be displayed when visiting the site
1818

1919
It may be desireable to run the ServiceControl services in an isolated network. When doing so ServicePulse must be configured to connect to those services using environment variables:
2020

0 commit comments

Comments
 (0)