From 5badfdd09e939094d828fd169a8f1a021bbe058e Mon Sep 17 00:00:00 2001 From: Luke Berndt Date: Sun, 8 Sep 2024 21:20:11 -0400 Subject: [PATCH] on second thought, lets not have a separate upload server --- admin/src/System/System.js | 2 +- certbot-compose.yml | 2 +- docker-compose.yml | 2 -- nginx-proxy/prod/vhosts/site.template | 28 --------------------------- nginx-proxy/test/vhosts/site.template | 21 -------------------- prod.env.example | 1 - test.env.example | 1 - 7 files changed, 2 insertions(+), 55 deletions(-) diff --git a/admin/src/System/System.js b/admin/src/System/System.js index 46597c6..2d7e619 100644 --- a/admin/src/System/System.js +++ b/admin/src/System/System.js @@ -288,7 +288,7 @@ const System = () => { '",\n\t\t\t"apiKey": "' + system.key + '"\n\t\t}\n\t],\n\t"uploadServer": "' + - process.env.REACT_APP_UPLOAD_SERVER + + process.env.REACT_APP_BACKEND_SERVER + '"\n}'; switch (system.systemType) { diff --git a/certbot-compose.yml b/certbot-compose.yml index 21cfd9d..388c1cb 100644 --- a/certbot-compose.yml +++ b/certbot-compose.yml @@ -27,7 +27,7 @@ services: - ${PWD}/data/certbot/conf/:/etc/letsencrypt/:rw entrypoint: "certbot certonly --webroot -w /var/www/certbot \ --email ${REACT_APP_ADMIN_EMAIL} \ - -d ${DOMAIN_NAME} -d www.${DOMAIN_NAME} -d api.${DOMAIN_NAME} -d admin.${DOMAIN_NAME} -d account.${DOMAIN_NAME} -d upload.${DOMAIN_NAME}\ + -d ${DOMAIN_NAME} -d www.${DOMAIN_NAME} -d api.${DOMAIN_NAME} -d admin.${DOMAIN_NAME} -d account.${DOMAIN_NAME} \ --rsa-key-size 4096 \ --agree-tos \ --force-renewal" diff --git a/docker-compose.yml b/docker-compose.yml index 0c9b746..7b26ff4 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -104,7 +104,6 @@ services: context: ./admin args: - REACT_APP_BACKEND_SERVER - - REACT_APP_UPLOAD_SERVER - REACT_APP_ADMIN_SERVER - REACT_APP_ACCOUNT_SERVER - REACT_APP_FRONTEND_SERVER @@ -114,7 +113,6 @@ services: image: "admin:${TAG}-${STAGE}" environment: - REACT_APP_BACKEND_SERVER - - REACT_APP_UPLOAD_SERVER - REACT_APP_ADMIN_SERVER - REACT_APP_ACCOUNT_SERVER - REACT_APP_FRONTEND_SERVER diff --git a/nginx-proxy/prod/vhosts/site.template b/nginx-proxy/prod/vhosts/site.template index 8350fbe..5d0f33a 100644 --- a/nginx-proxy/prod/vhosts/site.template +++ b/nginx-proxy/prod/vhosts/site.template @@ -52,34 +52,6 @@ server { } } - -server { - listen 443 ssl; - ssl_certificate /etc/letsencrypt/live/${DOMAIN_NAME}/fullchain.pem; - ssl_certificate_key /etc/letsencrypt/live/${DOMAIN_NAME}/privkey.pem; - ssl_protocols TLSv1 TLSv1.1 TLSv1.2; - ssl_prefer_server_ciphers on; - ssl_ciphers 'ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-DSS-AES128-GCM-SHA256:kEDH+AESGCM:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA:ECDHE-ECDSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-DSS-AES128-SHA256:DHE-RSA-AES256-SHA256:DHE-DSS-AES256-SHA:DHE-RSA-AES256-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256:AES128-SHA:AES256-SHA:AES:CAMELLIA:DES-CBC3-SHA:!aNULL:!eNULL:!EXPORT:!DES:!RC4:!MD5:!PSK:!aECDH:!EDH-DSS-DES-CBC3-SHA:!EDH-RSA-DES-CBC3-SHA:!KRB5-DES-CBC3-SHA'; - ssl_session_timeout 1d; - ssl_session_cache shared:SSL:50m; - ssl_stapling on; - ssl_stapling_verify on; - add_header Strict-Transport-Security max-age=15768000; - - server_name upload.${DOMAIN_NAME}; - - location /~*/upload { - proxy_pass http://backend:3005; - proxy_http_version 1.1; - proxy_set_header Upgrade $http_upgrade; - proxy_set_header Connection "upgrade"; - proxy_set_header Host $host; - proxy_cache_bypass $http_upgrade; - include /etc/nginx/proxy.conf; - access_log off; - } -} - server { listen 443 ssl; ssl_certificate /etc/letsencrypt/live/${DOMAIN_NAME}/fullchain.pem; diff --git a/nginx-proxy/test/vhosts/site.template b/nginx-proxy/test/vhosts/site.template index 185e774..aa12004 100644 --- a/nginx-proxy/test/vhosts/site.template +++ b/nginx-proxy/test/vhosts/site.template @@ -83,24 +83,3 @@ server { access_log off; } } - -server { - listen 80; - - server_name upload.${DOMAIN_NAME}; - - location /.well-known/acme-challenge/ { - root /var/www/certbot; - } - - location /~*/upload { - proxy_pass http://backend:3005; - include /etc/nginx/proxy.conf; - proxy_http_version 1.1; - proxy_set_header Upgrade $http_upgrade; - proxy_set_header Connection "upgrade"; - proxy_set_header Host $host; - proxy_cache_bypass $http_upgrade; - access_log off; - } -} diff --git a/prod.env.example b/prod.env.example index 8546cb9..24ddb02 100644 --- a/prod.env.example +++ b/prod.env.example @@ -17,7 +17,6 @@ export NODE_ENV="production" export PROTOCOL="https://" export REACT_APP_BACKEND_SERVER="${PROTOCOL}api.${DOMAIN_NAME}" -export REACT_APP_UPLOAD_SERVER="${PROTOCOL}upload.${DOMAIN_NAME}" export REACT_APP_FRONTEND_SERVER="${PROTOCOL}${DOMAIN_NAME}" export REACT_APP_ACCOUNT_SERVER="${PROTOCOL}account.${DOMAIN_NAME}" export REACT_APP_ADMIN_SERVER="${PROTOCOL}admin.${DOMAIN_NAME}" diff --git a/test.env.example b/test.env.example index f88d9c3..e740fb6 100644 --- a/test.env.example +++ b/test.env.example @@ -17,7 +17,6 @@ export NODE_ENV="test" export PROTOCOL="http://" export REACT_APP_BACKEND_SERVER="${PROTOCOL}api.${DOMAIN_NAME}" -export REACT_APP_UPLOAD_SERVER="${PROTOCOL}upload.${DOMAIN_NAME}" export REACT_APP_FRONTEND_SERVER="${PROTOCOL}${DOMAIN_NAME}" export REACT_APP_ACCOUNT_SERVER="${PROTOCOL}account.${DOMAIN_NAME}" export REACT_APP_ADMIN_SERVER="${PROTOCOL}admin.${DOMAIN_NAME}"