chore: add build id to settings page (#6873)
- Adds a build Id to the settings page
This commit is contained in:
@@ -60,9 +60,14 @@ RUN if [ "$RAILS_ENV" = "production" ]; then \
|
||||
&& rm -rf spec node_modules tmp/cache; \
|
||||
fi
|
||||
|
||||
# Generate .git_sha file with current commit hash
|
||||
RUN git rev-parse HEAD > /app/.git_sha
|
||||
|
||||
# Remove unnecessary files
|
||||
RUN rm -rf /gems/ruby/3.1.0/cache/*.gem \
|
||||
&& find /gems/ruby/3.1.0/gems/ \( -name "*.c" -o -name "*.o" \) -delete
|
||||
&& find /gems/ruby/3.1.0/gems/ \( -name "*.c" -o -name "*.o" \) -delete \
|
||||
&& rm -rf .git \
|
||||
&& rm .gitignore
|
||||
|
||||
# final build stage
|
||||
FROM ruby:3.1.3-alpine3.16
|
||||
@@ -100,6 +105,9 @@ RUN if [ "$RAILS_ENV" != "production" ]; then \
|
||||
COPY --from=pre-builder /gems/ /gems/
|
||||
COPY --from=pre-builder /app /app
|
||||
|
||||
# Copy .git_sha file from pre-builder stage
|
||||
COPY --from=pre-builder /app/.git_sha /app/.git_sha
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
EXPOSE 3000
|
||||
|
||||
Reference in New Issue
Block a user