-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
56 lines (41 loc) · 1.83 KB
/
Dockerfile
File metadata and controls
56 lines (41 loc) · 1.83 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
FROM node:13.10.1-alpine as node-build-stage
# Set default values to pass as env var on Docker image buildtime
ARG VUE_APP_FACEBOOK_URL=''
ARG VUE_APP_INSTAGRAM_URL=''
ARG VUE_APP_TWITTER_URL=''
ARG VUE_APP_GITHUB_URL=''
ARG VUE_APP_EMAIL_URL=''
ARG VUE_APP_WEBSITE_TITLE_FONTFAMILY='Bungee, cursive'
ARG VUE_APP_WEBSITE_FAVICON_URL=''
ARG VUE_APP_WEBSITE_LOGO_URL=''
ARG VUE_APP_WEBSITE_TITLE='Sitio web en desarrollo'
ARG VUE_APP_WEBSITE_DESCRIPTION='Estamos creando una experiencia personalizada para ti, mientras tanto puedes enterarte de este proyecto en las redes sociales a continuación.'
ARG VUE_APP_WEBSITE_VIDEO_URL=''
ARG VUE_APP_WEBSITE_BACKGROUND_COLOR='#4d0059'
ARG VUE_APP_WEBSITE_COLOR='white'
ARG VUE_APP_HIDE_WEBSITE_FOOTER='False'
ARG VUE_APP_BACKGROUND_IMAGE_URL='url("https://www.transparenttextures.com/patterns/shattered.png")'
ARG VUE_APP_ANALYTICS_ID=''
# hacer la carpeta 'app' el directorio de trabajo actual
WORKDIR /app
# copiar 'package.json' y 'package-lock.json' (si están disponibles)
COPY package*.json ./
# instalar dependencias del proyecto
RUN npm install
# copiar los archivos y carpetas del proyecto al directorio de trabajo actual (es decir, la carpeta 'app')
COPY . .
# construir aplicación para producción minificada
RUN npm run build
# production stage
FROM nginx:1.13.12-alpine as production-stage
ENV PORT=$PORT
ENV APP_HOST=$APP_HOST
WORKDIR /app
# copiar el sitio web construido para ser servido por nginx
COPY --from=node-build-stage /app/dist /usr/share/nginx/html
# Copiar el archivo de configuración de nginx generato en nginx-config-build-stage
# COPY --from=nginx-config-build-stage /app/default.conf /etc/nginx/conf.d/default.conf
COPY --from=node-build-stage /app/nginx/default.conf default.conf
COPY --from=node-build-stage /app/nginx/serve.sh serve.sh
ENTRYPOINT ["/bin/sh"]
CMD ["serve.sh"]