Added mailer to fullstack deployment

This commit is contained in:
Nicolai Ort 2021-03-02 18:54:53 +01:00
parent 0533d2e143
commit f2bccffd0a
2 changed files with 29 additions and 0 deletions

View File

@ -44,6 +44,19 @@ services:
NODE_ENV: production
networks:
- default
mailer:
image: registry.odit.services/lfk/mailer:dev
environment:
APP_PORT: 4010
NODE_ENV: production
APP_URL: http://localhost:4010
MAIL_FROM: h2ifdztl43xaipix@ethereal.email
MAIL_PASSWORD: BRG3EYpns67hrd6zMC
MAIL_PORT: '587'
MAIL_SERVER: smtp.ethereal.email
MAIL_USER: h2ifdztl43xaipix@ethereal.email
networks:
- default
proxy:
image: nginx:latest
ports:
@ -54,6 +67,7 @@ services:
- backend_server
- frontend_server
- document_server
- mailer
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf
networks:

View File

@ -47,5 +47,20 @@ http {
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-Host $server_name;
}
#Location /mailer redicts every mailing related url to the mailer container.
location /mailer {
rewrite /mailer/(.*) /$1 break;
proxy_pass http://mailer:4010;
proxy_redirect off;
#Set the headers needed by the backend for smooth proxying
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection keep-alive;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-Host $server_name;
}
}
}