Skip to content
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
1 change: 1 addition & 0 deletions protocol-dashboard/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ ADD src ./src
ADD public ./public
ADD scripts ./scripts
ADD types ./types
RUN chmod +x ./scripts/docker-entrypoint.sh

ENV DASHBOARD_BASE_URL="/dashboard/"
RUN npm install --legacy-peer-deps
20 changes: 20 additions & 0 deletions protocol-dashboard/scripts/docker-entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/bin/sh

FIRST_RUN_FLAG="./.firstrun"

if [ ! -f "$FIRST_RUN_FLAG" ]; then
echo "Building dist..."
npm run build:$NETWORK

if [ $? -eq 0 ]; then
echo "Successfully built dist"
touch "$FIRST_RUN_FLAG"
else
echo "'npm run build:$NETWORK' failed with exit code $?. Exiting..."
exit 1
fi
else
echo "dist already built"
fi

exec npm run serve