Skip to content

Commit 14e8929

Browse files
committed
Add MATOMO_SITE_ID to Dokcerfile
1 parent 1cfa409 commit 14e8929

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

Dockerfile

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
ARG CONTRIBUTIONS_API_URL=https://contributions.api.dev.josa.ngo HOST=0.0.0.0 PORT=3000 USER=node
1+
ARG CONTRIBUTIONS_API_URL=https://contributions.api.dev.josa.ngo HOST=0.0.0.0 PORT=3000 USER=node MATOMO_SITE_ID=11
22

33
###########
44
# BUILDER #
@@ -8,14 +8,15 @@ FROM node:16-alpine3.14 as builder
88
ARG CONTRIBUTIONS_API_URL
99
ARG HOST
1010
ARG PORT
11+
ARG MATOMO_SITE_ID
1112

1213
# copy build context and install dependencies
1314
WORKDIR /workspace
1415
COPY . .
1516
RUN npm install
1617

1718
# Inject the enviromental variables
18-
ENV CONTRIBUTIONS_API_URL=${CONTRIBUTIONS_API_URL} HOST=${HOST} PORT=${PORT}
19+
ENV CONTRIBUTIONS_API_URL=$CONTRIBUTIONS_API_URL HOST=$HOST PORT=$PORT MATOMO_SITE_ID=$MATOMO_SITE_ID
1920

2021
# build NuxtJS project
2122
RUN npm run build:modern
@@ -29,6 +30,7 @@ ARG CONTRIBUTIONS_API_URL
2930
ARG HOST
3031
ARG PORT
3132
ARG USER
33+
ARG MATOMO_SITE_ID
3234

3335
# copy builder output to project workdir
3436
WORKDIR /app
@@ -38,7 +40,7 @@ COPY --from=builder --chown=${USER}:${USER} /workspace/node_modules /app/node_mo
3840
COPY --from=builder --chown=${USER}:${USER} /workspace/package.json /app/
3941

4042
# Inject the enviromental variables
41-
ENV CONTRIBUTIONS_API_URL=${CONTRIBUTIONS_API_URL} HOST=${HOST} PORT=${PORT}
43+
ENV CONTRIBUTIONS_API_URL=$CONTRIBUTIONS_API_URL HOST=$HOST PORT=$PORT MATOMO_SITE_ID=$MATOMO_SITE_ID
4244

4345
# set user context
4446
USER ${USER}

0 commit comments

Comments
 (0)