Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: 2323 adding version and commit on opencost-ui logs #2388

Merged
merged 1 commit into from
Dec 15, 2023
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
5 changes: 5 additions & 0 deletions ui/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ RUN npx parcel build src/index.html

FROM nginx:alpine

ARG version=dev
ARG commit=HEAD
ENV VERSION=${version}
ENV HEAD=${commit}

ENV API_PORT=9003
ENV API_SERVER=0.0.0.0
ENV UI_PORT=9090
Expand Down
5 changes: 5 additions & 0 deletions ui/Dockerfile.cross
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
FROM nginx:alpine

ARG version=dev
ARG commit=HEAD
ENV VERSION=${version}
ENV HEAD=${commit}

ENV API_PORT=9003
ENV API_SERVER=0.0.0.0
ENV UI_PORT=9090
Expand Down
2 changes: 2 additions & 0 deletions ui/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,7 @@ fi

envsubst '$API_PORT $API_SERVER $UI_PORT' < /etc/nginx/conf.d/default.nginx.conf.template > /etc/nginx/conf.d/default.nginx.conf

echo "Starting ui version $VERSION ($HEAD)"

# Run the parent (nginx) container's entrypoint script
exec /docker-entrypoint.sh "$@"
7 changes: 7 additions & 0 deletions ui/justfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
version := `../tools/image-tag`
commit := `git rev-parse --short HEAD`

default:
just --list

Expand All @@ -13,6 +16,8 @@ build IMAGETAG: build-local
-f 'Dockerfile.cross' \
--provenance=false \
-t {{IMAGETAG}}-amd64 \
--build-arg version={{version}} \
--build-arg commit={{commit}} \
--push \
.

Expand All @@ -22,6 +27,8 @@ build IMAGETAG: build-local
-f 'Dockerfile.cross' \
--provenance=false \
-t {{IMAGETAG}}-arm64 \
--build-arg version={{version}} \
--build-arg commit={{commit}} \
--push \
.

Expand Down
Loading