mailer service

This commit is contained in:
Joan 2019-01-15 08:12:37 +01:00
parent 3bdc202732
commit c91871e17f
4 changed files with 20 additions and 2 deletions

View File

@ -10,6 +10,7 @@ services:
- ${PORT}:80
links:
- api
- mailer
api:
image: registry.verdnatura.es/salix-api:${TAG}
restart: unless-stopped
@ -19,3 +20,12 @@ services:
volumes:
- /containers/salix:/etc/salix
- /mnt/storage/pdfs:/var/lib/salix/pdfs
mailer:
image: registry.verdnatura.es/salix-mailer:${TAG}
restart: unless-stopped
build:
dockerfile: services/mailer/Dockerfile
environment:
- NODE_ENV
volumes:
- /config/vn-mailer

View File

@ -1,5 +1,6 @@
FROM vn-loopback:latest
FROM node:lts-slim
COPY mailer /app
RUN npm -g install pm2
COPY . /app
WORKDIR /app
CMD ["pm2-docker", "./server/server.js"]

View File

@ -31,6 +31,9 @@ http {
}
{{/services}}
location ~ ^/mailer(?:/(.*)?)$ {
proxy_pass http://127.0.0.1:{{defaultPort}}/$1$is_args$args;
}
location ~ ^/static(?:/(.*)?)$ {
proxy_pass http://127.0.0.1:{{devServerPort}}/$1$is_args$args;
}

View File

@ -14,6 +14,10 @@ server {
}
{{/services}}
location ~ ^/mailer(?:/(.*))?$ {
resolver 127.0.0.11;
proxy_pass http://mailer:{{defaultPort}}/$1$is_args$args;
}
location ~ ^/static(?:/(.*))?$ {
alias /salix/dist/$1;
autoindex on;