forked from Human-Connection/Human-Connection
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile.maintenance
40 lines (30 loc) · 1.2 KB
/
Dockerfile.maintenance
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
37
38
39
40
FROM node:13.0.1-alpine as build
LABEL Description="Maintenance page of the Social Network Human-Connection.org" Vendor="Human-Connection gGmbH" Version="0.0.1" Maintainer="Human-Connection gGmbH ([email protected])"
EXPOSE 3000
CMD ["yarn", "run", "start"]
# Expose the app port
ARG BUILD_COMMIT
ENV BUILD_COMMIT=$BUILD_COMMIT
ARG WORKDIR=/nitro-web
RUN mkdir -p $WORKDIR
WORKDIR $WORKDIR
# See: https://github.com/nodejs/docker-node/pull/367#issuecomment-430807898
RUN apk --no-cache add git
COPY package.json yarn.lock ./
RUN yarn install --production=false --frozen-lockfile --non-interactive
COPY assets assets
COPY components/LocaleSwitch/ components/LocaleSwitch
COPY components/Dropdown.vue components/Dropdown.vue
COPY layouts/blank.vue layouts/blank.vue
COPY locales locales
COPY mixins mixins
COPY plugins/i18n.js plugins/v-tooltip.js plugins/styleguide.js plugins/
COPY static static
COPY nuxt.config.js nuxt.config.js
# this will also ovewrite the existing package.json
COPY maintenance/source ./
RUN yarn run generate
FROM nginx:alpine
COPY --from=build ./nitro-web/dist/ /usr/share/nginx/html/
RUN rm /etc/nginx/conf.d/default.conf
COPY maintenance/nginx/custom.conf /etc/nginx/conf.d/