tacticalrmm/docker/app/dockerfile

18 lines
590 B
Plaintext
Raw Normal View History

2020-02-12 16:18:43 +00:00
FROM node:12-alpine AS builder
ARG APP_HOST
ARG API_HOST
EXPOSE 80
WORKDIR /home/node
RUN apk add gettext
COPY ./web .
COPY ./docker/app/.env.local.keep /home/.env.local.tmp
RUN envsubst '\$APP_HOST' < /home/.env.local.tmp > /home/node/.env.local && rm /home/.env.local.tmp
2020-02-12 16:18:43 +00:00
RUN npm install && npm run build
COPY ./docker/app/app.conf /home/node/app.conf.tmp
RUN envsubst '\$APP_HOST' < /home/node/app.conf.tmp > /home/node/app.conf
FROM nginx:alpine
WORKDIR /usr/share/nginx/html
COPY --from=builder /home/node/dist .
COPY --from=builder /home/node/app.conf /etc/nginx/conf.d/default.conf