Renamed services

Made configs and scripts consistent
This commit is contained in:
Vivek Santayana 2022-06-17 02:00:37 +01:00
parent 225ef71518
commit 6028ac2d3c
4 changed files with 28 additions and 7 deletions

View File

@ -5,7 +5,7 @@ SECRET_KEY= # Long, secure, secret string.
DATA=./data/
## Flask Mail Configuration
MAIL_SERVER=ref_test_postfix # Must match name of the Docker service
MAIL_SERVER=postfix # Must match name of the Docker service
MAIL_PORT=25
MAIL_USE_TLS=False
MAIL_USE_SSL=False

View File

@ -1,7 +1,7 @@
version: '3.9'
services:
ref_test_server:
nginx:
container_name: ref_test_server
image: nginx:alpine
volumes:
@ -21,7 +21,7 @@ services:
- ref_test_app
command: "/bin/sh -c 'while :; do sleep 6h & wait $${!}; nginx -s reload; done & nginx -g \"daemon off;\"'"
ref_test_app:
app:
container_name: ref_test_app
image: reftest
build: ./ref-test
@ -38,7 +38,7 @@ services:
depends_on:
- ref_test_postfix
ref_test_postfix:
postfix:
container_name: ref_test_postfix
image: catatnight/postfix:latest
restart: unless-stopped
@ -49,7 +49,7 @@ services:
networks:
- backend
ref_test_certbot:
certbot:
container_name: ref_test_certbot
image: certbot/certbot
volumes:

View File

@ -1,5 +1,5 @@
upstream reftest {
server ref_test_app:5000;
server app:5000;
}
server {
@ -15,7 +15,7 @@ server {
listen 443 ssl http2 default_server;
listen [::]:443 ssl http2 default_server;
#SSL configuration
# SSL configuration
include /etc/nginx/ssl.conf;
include /etc/nginx/certbot-challenge.conf;
@ -34,3 +34,24 @@ server {
proxy_pass http://reftest;
}
}
server {
server_name www.domain_name;
listen 80;
listen [::]:80;
# Redirect to non-www
return 301 $scheme://example.com$request_uri;
}
server {
server_name www.domain_name;
listen 443 ssl http2;
listen [::]:443 ssl http2;
# SSL configuration
include /etc/nginx/ssl.conf;
include /etc/nginx/certbot-challenge.conf;
# Redirect to non-www
return 301 $scheme://example.com$request_uri;
}