build vue
This commit is contained in:
@@ -1,18 +1,26 @@
|
|||||||
FROM nginx:latest
|
FROM nginx:latest
|
||||||
|
|
||||||
|
|
||||||
# Copy template config
|
# Copy template config
|
||||||
COPY nginx.conf.template /etc/nginx/nginx.conf.template
|
COPY nginx.conf.template /etc/nginx/nginx.conf.template
|
||||||
COPY nginx_setup.conf.template /etc/nginx/nginx_setup.conf.template
|
COPY nginx_setup.conf.template /etc/nginx/nginx_setup.conf.template
|
||||||
|
|
||||||
COPY entrypoint.sh /entrypoint.sh
|
COPY entrypoint.sh /entrypoint.sh
|
||||||
|
|
||||||
# Update package list and install gettext-base
|
# Install dependencies
|
||||||
RUN apt-get update && apt-get install -y gettext-base
|
RUN apt-get update && apt-get install -y \
|
||||||
|
gettext-base \
|
||||||
|
curl \
|
||||||
|
build-essential \
|
||||||
|
git \
|
||||||
|
nodejs\
|
||||||
|
&& npm install -g npm@latest
|
||||||
|
|
||||||
# Replace variables at build time
|
WORKDIR /app
|
||||||
ENV BACKEND_HOST=backend
|
COPY vue/ ./
|
||||||
ENV BACKEND_PORT=8080
|
RUN npm install
|
||||||
ENV DOMAIN=example.com
|
RUN npm run build
|
||||||
|
|
||||||
|
RUN rm -rf /etc/nginx/html/* \
|
||||||
|
&& cp -r ./dist/* /etc/nginx/html/
|
||||||
|
|
||||||
ENTRYPOINT ["/entrypoint.sh"]
|
ENTRYPOINT ["/entrypoint.sh"]
|
||||||
|
|||||||
Reference in New Issue
Block a user