sync public allowlist from private myoffice

This commit is contained in:
myoffice-sync
2026-08-05 10:36:17 +00:00
parent 6f7fd61ee9
commit 874796c860
720 changed files with 2841 additions and 69563 deletions
+34
View File
@@ -0,0 +1,34 @@
# MyOffice SPA (nginx :80) — build from repo root:
# docker build -f Docker/Dockerfile.web --build-arg API_PUBLIC_URL=http://localhost:32081 -t myoffice-web .
FROM node:20-alpine AS build
WORKDIR /src
ARG API_PUBLIC_URL=http://localhost:32081
COPY MyOffice.SPA/package.json MyOffice.SPA/package-lock.json MyOffice.SPA/.npmrc ./
RUN npm ci
COPY MyOffice.SPA/ ./
# environment.ts is gitignored locally — stub + docker env with public API URL (host port).
RUN cp src/environments/environment.sample.ts src/environments/environment.ts \
&& printf '%s\n' \
'export const environment = {' \
' production: true,' \
" apiUrl: '${API_PUBLIC_URL}'," \
" identityServer: '${API_PUBLIC_URL}/'," \
" allowedUrls: ['${API_PUBLIC_URL}']," \
' requireHttps: false,' \
' externalLogins: {' \
" google: { clientId: '' }," \
" auth0: { clientId: '', domain: '' }" \
' }' \
'};' \
> src/environments/environment.docker.ts \
&& npm run build -- --configuration docker --output-path /out \
&& if [ -d /out/browser ]; then cp -a /out/browser/. /out/ && rm -rf /out/browser; fi
FROM nginx:1.27-alpine AS final
COPY Docker/nginx.conf /etc/nginx/conf.d/default.conf
COPY --from=build /out /usr/share/nginx/html
EXPOSE 80