Some checks failed
Deploy with Docker Compose / deploy (push) Has been cancelled
37 lines
982 B
Docker
37 lines
982 B
Docker
FROM nginx:latest
|
|
RUN rm -rf /etc/nginx/html/*
|
|
|
|
# Install dependencies needed to add NodeSource repo
|
|
RUN apt-get update && apt-get install -y \
|
|
curl \
|
|
build-essential \
|
|
git \
|
|
gettext-base \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
# Install Node.js LTS + npm
|
|
RUN curl -fsSL https://deb.nodesource.com/setup_lts.x | bash - \
|
|
&& apt-get install -y nodejs \
|
|
&& npm install -g npm@latest
|
|
|
|
|
|
WORKDIR /app
|
|
COPY vue/ ./
|
|
RUN npm install
|
|
RUN npm run build
|
|
|
|
|
|
RUN mkdir -p /etc/nginx/html \
|
|
&& cp -r ./dist/* /etc/nginx/html/
|
|
|
|
COPY nginx.conf.template /etc/nginx/nginx.conf.template
|
|
COPY nginx_setup.conf.template /etc/nginx/nginx_setup.conf.template
|
|
COPY nginx_dev.conf.template /etc/nginx/nginx_dev.conf.template
|
|
COPY robots.txt /etc/nginx/html/robots.txt
|
|
# Remove default symlinks so logs write to real files on the shared volume
|
|
RUN unlink /var/log/nginx/access.log && unlink /var/log/nginx/error.log
|
|
|
|
COPY entrypoint.sh /entrypoint.sh
|
|
|
|
ENTRYPOINT ["/entrypoint.sh"]
|