Commit f10cca41 authored by Pedro Eduardo Trujillo's avatar Pedro Eduardo Trujillo
Browse files

Corrige y optimiza definición de imagen Docker

parent c3b9f747
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
*
!/dist*.tar.gz
!dist*.tar.gz
+7 −6
Original line number Diff line number Diff line
FROM node:alpine
FROM node:11-alpine

LABEL maintainer="info@redmic.es"

ENV DIRPATH /opt/redmic
ARG PORT=3050
ARG DIRPATH=/redmic

WORKDIR ${DIRPATH}
EXPOSE ${PORT}

ADD dist*.tar.gz ./
WORKDIR ${DIRPATH}

RUN npm install --production

EXPOSE ${WEB_PORT}
ADD dist*.tar.gz ./

ENTRYPOINT npm start -- -b
CMD ["node", "app", "-b"]
+1 −1
Original line number Diff line number Diff line
WEB_PORT=3050
PORT=3050
+2 −2
Original line number Diff line number Diff line
@@ -9,7 +9,7 @@ services:
    networks:
      - traefik-net
    healthcheck:
      test: wget --spider -S -t 3 http://localhost:${WEB_PORT}
      test: wget --spider -S -t 3 http://localhost:${PORT}
      interval: 30s
      timeout: 10s
      retries: 3
@@ -18,7 +18,7 @@ services:
      mode: replicated
      replicas: 1
      labels:
        traefik.port: '${WEB_PORT}'
        traefik.port: '${PORT}'
        traefik.docker.network: traefik-net
        traefik.default.frontend.rule: Host:${PUBLIC_HOSTNAME}
        traefik.es.frontend.rule: Host:es.${PUBLIC_HOSTNAME}