Skip to content

Commit 51e3129

Browse files
committed
Bake-in relative root url when precompiling assets
By using the RAILS_RELATIVE_URL_ROOT argument at build time, the asset pipeline precompiles with an embedded base URL. This approach is to ensure that all asset references are aligned with the required subdirectory.
1 parent 97f3a59 commit 51e3129

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Dockerfile.production

+3
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,15 @@ ARG RUBY_VERSION=3.1.4-alpine
22
ARG NODE_VERSION=20.15.1-r0
33
ARG WKHTMLTOPDF_VERSION=3.21.2-0.12.6-small
44
ARG NGINX_VERSION=1.27.4-alpine
5+
ARG RAILS_RELATIVE_URL_ROOT="/dmp-pgd-staging"
56

67
FROM surnet/alpine-wkhtmltopdf:$WKHTMLTOPDF_VERSION AS wkhtmltopdf
78

89
FROM ruby:$RUBY_VERSION AS builder
910

1011
ARG NODE_VERSION
12+
ARG RAILS_RELATIVE_URL_ROOT
13+
1114
ENV INSTALL_PATH=/usr/src/app \
1215
RAILS_ENV=production \
1316
NODE_ENV=production \

0 commit comments

Comments
 (0)