Commit d1eeafe 1 parent cfd5f2b commit d1eeafe Copy full SHA for d1eeafe
File tree 3 files changed +24
-5
lines changed
3 files changed +24
-5
lines changed Original file line number Diff line number Diff line change @@ -7,11 +7,15 @@ COPY frontend/package.json frontend/package-lock.json frontend/.npmrc ./frontend
7
7
COPY frontend/bin/ ./frontend/bin/
8
8
COPY frontend/env/ ./frontend/env/
9
9
10
- RUN cd frontend && npm ci --quiet --production
10
+ # since ENV is only used for the purposes of copying the correct
11
+ # project_${env}.js file to common/project.js, this is a build arg
12
+ # which subsequently gets set as an environment variable. This is
13
+ # done to avoid confusion since it is not a required run time var.
14
+ ARG ENV=selfhosted
15
+ RUN cd frontend && ENV=${ENV} npm ci --quiet --production
11
16
12
17
# Copy the entire project - Webpack puts compiled assets into the Django folder
13
18
COPY . .
14
- ENV ENV=prod
15
19
ENV STATIC_ASSET_CDN_URL=/static/
16
20
RUN cd frontend && npm run bundledjango
17
21
Original file line number Diff line number Diff line change @@ -11,11 +11,15 @@ COPY --chown=node:node frontend/package.json frontend/package-lock.json frontend
11
11
COPY --chown=node:node frontend/bin/ ./bin/
12
12
COPY --chown=node:node frontend/env/ ./env/
13
13
14
- RUN npm ci --quiet --production
14
+ # since ENV is only used for the purposes of copying the correct
15
+ # project_${env}.js file to common/project.js, this is a build arg
16
+ # which subsequently gets set as an environment variable. This is
17
+ # done to avoid confusion since it is not a required run time var.
18
+ ARG ENV=selfhosted
19
+ RUN ENV=${ENV} npm ci --quiet --production
15
20
16
21
COPY --chown=node:node frontend .
17
22
COPY .release-please-manifest.json .
18
- ENV ENV=prod
19
23
RUN npm run bundle
20
24
21
25
@@ -26,7 +30,6 @@ USER node
26
30
WORKDIR /srv/bt
27
31
COPY --from=build --chown=node:node /srv/bt/ .
28
32
29
- ENV ENV=prod
30
33
ENV NODE_ENV=production
31
34
32
35
EXPOSE 8080
Original file line number Diff line number Diff line change
1
+ const globalThis = typeof window === 'undefined' ? global : window
2
+ module . exports = global . Project = {
3
+ env : 'selfhosted' ,
4
+
5
+ // Self Hosted Defaults environment
6
+ flagsmith : 'MXSepNNQEacBBzxAU7RagJ' ,
7
+ flagsmithClientAPI : 'https://edge.api.flagsmith.com/api/v1/' ,
8
+
9
+ // This is used for Sentry tracking
10
+ maintenance : false ,
11
+ ...( globalThis . projectOverrides || { } ) ,
12
+ }
You can’t perform that action at this time.
0 commit comments