chore: migrate email service to dedicated SSL-enabled nginx server and remove default values from email settings
All checks were successful
Deploy Beta (NATIVE) / deploy (push) Successful in 21s
All checks were successful
Deploy Beta (NATIVE) / deploy (push) Successful in 21s
This commit is contained in:
parent
eeaa2dada9
commit
dcffd5e056
2 changed files with 26 additions and 13 deletions
|
|
@ -142,8 +142,8 @@ MEDIA_ROOT = BASE_DIR / 'media'
|
||||||
email_secret = get_secret("arn:aws:secretsmanager:ap-south-2:764709663363:secret:emailcredentials-DOIQtc")
|
email_secret = get_secret("arn:aws:secretsmanager:ap-south-2:764709663363:secret:emailcredentials-DOIQtc")
|
||||||
|
|
||||||
EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
|
EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
|
||||||
EMAIL_HOST = email_secret.get('smtp', 'smtp.hostinger.com')
|
EMAIL_HOST = email_secret.get('smtp')
|
||||||
EMAIL_PORT = int(email_secret.get('smtp_port', 465))
|
EMAIL_PORT = int(email_secret.get('smtp_port'))
|
||||||
EMAIL_USE_SSL = True # Assuming SSL for port 465
|
EMAIL_USE_SSL = True
|
||||||
EMAIL_HOST_USER = email_secret.get('username', 'info@tradhox.com')
|
EMAIL_HOST_USER = email_secret.get('username')
|
||||||
EMAIL_HOST_PASSWORD = email_secret.get('password', '')
|
EMAIL_HOST_PASSWORD = email_secret.get('password')
|
||||||
|
|
|
||||||
|
|
@ -28,14 +28,6 @@ server {
|
||||||
proxy_set_header X-Forwarded-Proto $scheme;
|
proxy_set_header X-Forwarded-Proto $scheme;
|
||||||
}
|
}
|
||||||
|
|
||||||
location /emailservice/ {
|
|
||||||
proxy_pass http://127.0.0.1:8091/;
|
|
||||||
proxy_set_header Host $host;
|
|
||||||
proxy_set_header X-Real-IP $remote_addr;
|
|
||||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
||||||
proxy_set_header X-Forwarded-Proto $scheme;
|
|
||||||
}
|
|
||||||
|
|
||||||
location /crm {
|
location /crm {
|
||||||
proxy_pass http://127.0.0.1:8081;
|
proxy_pass http://127.0.0.1:8081;
|
||||||
proxy_set_header Host $host;
|
proxy_set_header Host $host;
|
||||||
|
|
@ -65,3 +57,24 @@ server {
|
||||||
proxy_set_header X-Forwarded-Proto $scheme;
|
proxy_set_header X-Forwarded-Proto $scheme;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
server {
|
||||||
|
listen 9002 ssl;
|
||||||
|
listen [::]:9002 ssl;
|
||||||
|
|
||||||
|
server_name _;
|
||||||
|
|
||||||
|
ssl_certificate /etc/nginx/ssl/chained.crt;
|
||||||
|
ssl_certificate_key /etc/nginx/ssl/private.key;
|
||||||
|
|
||||||
|
ssl_protocols TLSv1.2 TLSv1.3;
|
||||||
|
ssl_ciphers HIGH:!aNULL:!MD5;
|
||||||
|
|
||||||
|
location / {
|
||||||
|
proxy_pass http://127.0.0.1:8091/;
|
||||||
|
proxy_set_header Host $host;
|
||||||
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
|
proxy_set_header X-Forwarded-Proto $scheme;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue