Skip to content

Instantly share code, notes, and snippets.

@RaimonxDev
Last active June 23, 2023 14:55
Show Gist options
  • Save RaimonxDev/afb03053c6b1c539ea7eb5a6f2dbcad2 to your computer and use it in GitHub Desktop.
Save RaimonxDev/afb03053c6b1c539ea7eb5a6f2dbcad2 to your computer and use it in GitHub Desktop.
version: "3.3"
services:
vue-plazafrontend:
container_name: app-angular
image: plazafrontend/app-vue:lts
labels:
- "traefik.enable=true"
- "traefik.docker.network=traefik"
# HABILITAMOS LA CONEXION HTTPS A ENTREPOINT LLAMADO "WEBSECURE"
- "traefik.http.routers.vue-plazafrontend-https.entrypoints=websecure"
- "traefik.http.routers.vue-plazafrontend-https.rule=Host(`vue.plazafrontend.io`)"
- "traefik.http.routers.vue-plazafrontend-https.tls=true"
# RESOLVER PARA CREAR EL CERTIFICADO
- "traefik.http.routers.vue-plazafrontend-https.tls.certresolver=myresolver"
networks:
- traefik
- vue-plazafrontend
networks:
traefik:
external: true
vue-plazafrontend:
# etapa de compilación
FROM node:lts-alpine3.10 as build-stage
WORKDIR /app
COPY package*.json ./
RUN npm install
COPY . .
RUN npm run build
# etapa de producción
FROM nginx:1.19.10-alpine as production-stage
COPY --from=build-stage /app/dist /usr/share/nginx/html
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment