mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-03-15 05:41:51 +00:00

Production containers now copy the Zeppelin source files at build-time rather than using a shared volume. This means fewer permission issues and backend/dashboard builds only have to run once at build-time, not every time the containers are started. Docs in PRODUCTION.md have been updated accordingly.
23 lines
737 B
Docker
23 lines
737 B
Docker
FROM node:18 AS builder
|
|
USER node
|
|
|
|
COPY --chown=node:node . /zeppelin
|
|
|
|
WORKDIR /zeppelin/dashboard
|
|
RUN ls -lah
|
|
RUN pwd
|
|
RUN npm ci && npm run build
|
|
|
|
FROM nginx
|
|
|
|
ARG API_PORT
|
|
ARG DOCKER_PROD_DOMAIN
|
|
|
|
RUN apt-get update && apt-get install -y openssl
|
|
RUN openssl req -x509 -newkey rsa:4096 -keyout /etc/ssl/private/zeppelin-self-signed-cert.key -out /etc/ssl/certs/zeppelin-self-signed-cert.pem -days 3650 -subj "/CN=${DOCKER_PROD_DOMAIN}" -nodes
|
|
|
|
COPY ./docker/production/nginx/default.conf /etc/nginx/conf.d/default.conf
|
|
RUN sed -ir "s/_API_PORT_/${API_PORT}/g" /etc/nginx/conf.d/default.conf
|
|
RUN sed -ir "s/_DOCKER_PROD_DOMAIN_/${DOCKER_PROD_DOMAIN}/g" /etc/nginx/conf.d/default.conf
|
|
|
|
COPY --from=builder /zeppelin/dashboard/dist /var/www
|