-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathDockerfile
36 lines (25 loc) · 1.02 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
FROM node AS translations-handler
RUN mkdir -p /opt/translations/dist
WORKDIR /opt/translations
RUN git init
RUN git remote add origin https://github.com/hzi-braunschweig/SORMAS-Project.git
RUN git fetch
RUN git checkout origin/development sormas-api/src/main/resources/
COPY docker/translations/convertTranslations.ts /opt/translations
COPY docker/translations/package.json /opt/translations
COPY docker/translations/package-lock.json /opt/translations
COPY src/assets/i18n/custom-translations.json /opt/translations
RUN cp -rf sormas-api/src/main/resources/* ./
RUN npm ci
RUN npx ts-node convertTranslations.ts
FROM node AS compile-image
WORKDIR /opt/ng
COPY package.json package-lock.json ./
RUN npm install
ENV PATH="./node_modules/.bin:$PATH"
COPY . ./
RUN npm run build
FROM nginx
COPY docker/angular/nginx.conf /etc/nginx/nginx.conf
COPY docker/angular/configure-envionment.sh /docker-entrypoint.d/99-configure-envionment.sh
COPY --from=compile-image /opt/ng/dist/app /usr/share/nginx/html