Skip to content
This repository was archived by the owner on Jun 5, 2025. It is now read-only.

Add support for runtime override of dashboard url. #1088

Merged
merged 1 commit into from
Feb 19, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,10 @@ COPY --from=builder /app /app

# Copy necessary artifacts from the webbuilder stage
COPY --from=webbuilder /usr/src/webapp/dist /var/www/html
USER root
RUN chown -R codegate /var/www/html
USER codegate

# Expose nginx
EXPOSE 9090

Expand Down
4 changes: 4 additions & 0 deletions scripts/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ generate_certs() {

# Function to start Nginx server for the dashboard
start_dashboard() {
if [ -n "${DASHBOARD_BASE_URL}" ]; then
echo "Overriding dashboard url with $DASHBOARD_BASE_URL"
sed -ibck "s|http://localhost:8989|http://$DASHBOARD_BASE_URL:8989|g" /var/www/html/assets/*.js
fi
echo "Starting the dashboard..."
nginx -g 'daemon off;' &
}
Expand Down