build vue

This commit is contained in:
2025-11-25 16:11:41 +00:00
parent 508b30f21b
commit ada53b87e2

View File

@@ -1,18 +1,26 @@
FROM nginx:latest
# Copy template config
COPY nginx.conf.template /etc/nginx/nginx.conf.template
COPY nginx_setup.conf.template /etc/nginx/nginx_setup.conf.template
COPY entrypoint.sh /entrypoint.sh
# Update package list and install gettext-base
RUN apt-get update && apt-get install -y gettext-base
# Install dependencies
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
ENV BACKEND_HOST=backend
ENV BACKEND_PORT=8080
ENV DOMAIN=example.com
WORKDIR /app
COPY vue/ ./
RUN npm install
RUN npm run build
RUN rm -rf /etc/nginx/html/* \
&& cp -r ./dist/* /etc/nginx/html/
ENTRYPOINT ["/entrypoint.sh"]