From c4e94de14f13adc4d2b4fdba9a0ef7cb7ff701d5 Mon Sep 17 00:00:00 2001 From: ray Date: Sun, 3 May 2020 15:10:54 +0300 Subject: [PATCH] updates --- .env-production | 8 +- README.md | 2 +- app/api/contact.js | 2 +- app/nuxt.config.js | 6 +- docker-compose.yml | 6 +- ...marcleopold => marcleopold.rayelliott.dev} | 75 +++++++++---------- 6 files changed, 49 insertions(+), 50 deletions(-) rename etc/nginx/sites-available/{marcleopold => marcleopold.rayelliott.dev} (54%) diff --git a/.env-production b/.env-production index 15abb3f..501349d 100644 --- a/.env-production +++ b/.env-production @@ -1,5 +1,5 @@ URL_INTERNAL=127.0.0.1 -URL_CMS=https://cms.marcleopold.isnet.uk -URL_APP=https://marcleopold.isnet.uk -PORT_APP=3003 -PORT_CMS=3004 +URL_CMS=https://cms.leopold.rayelliott.dev +URL_APP=https://leopold.rayelliott.dev +PORT_APP=3013 +PORT_CMS=3014 diff --git a/README.md b/README.md index 2d00b5d..746fe03 100644 --- a/README.md +++ b/README.md @@ -2,4 +2,4 @@ Rename either `.env-dev` or `.env-production` to `.env` before running for the first time. -If need to (re)create a database see server/README.md +If need to (re)create a database see cms/README.md diff --git a/app/api/contact.js b/app/api/contact.js index 8b89e04..c18514d 100644 --- a/app/api/contact.js +++ b/app/api/contact.js @@ -53,7 +53,7 @@ ${msg}` const mailJson = { from: 'server@gabbaell.co.uk', replyTo: email, - to: 'marcleopold.isnet@gabbaell.co.uk', + to: 'leopold@rayelliott.dev', subject: 'Contact form message concerning Marc Leopold', text: text, } diff --git a/app/nuxt.config.js b/app/nuxt.config.js index 7a663c9..3644f02 100644 --- a/app/nuxt.config.js +++ b/app/nuxt.config.js @@ -23,12 +23,12 @@ module.exports = { { hid: 'description', name: 'description', content: 'Photographer, Marc Leopold has images in numerous collections and publications. Here is a glimpse of his work, an insight into his philosophy and motivations.' }, - { property: 'og:image', content: 'https://marcleopold.isnet.uk/img/open-graph/marc-leopold-ss.png'}, + { property: 'og:image', content: 'https://leopold.rayelliott.dev/img/open-graph/marc-leopold-ss.png'}, { property: 'og:image:width', content: '1200'}, { property: 'og:image:height', content: '600'}, { property: 'og:image:type', content: 'image/png' }, { property: 'og:title', content: 'Marc Leopold Photography' }, - { property: 'og:url', content: 'https://marcleopold.isnet.uk' }, + { property: 'og:url', content: 'https://leopold.rayelliott.dev' }, { property: 'og:site_name', content: 'Marc Leopold Photography' }, { property: 'og:type', content: 'website'}, { property: 'og:description', content: 'Marc Leopold is a Chicago born photographer whose images have appeared in many collections and publications. His website is a showcase of his outstanding work and an insight into his philosophy and motivations.' }, @@ -108,7 +108,7 @@ module.exports = { }, proxy: { - '/api/v1/': 'https://cms.marcleopold.isnet.uk', + '/api/v1/': 'https://cms.leopold.rayelliott.dev', // FIXME: why this no work? // '/api/v1/': process.env.URL_CMS, }, diff --git a/docker-compose.yml b/docker-compose.yml index 629f966..329931e 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -3,10 +3,10 @@ version: "3" services: nuxt: build: ./app/ - container_name: marcleopold-website + container_name: marcleopold-rayelliott.dev restart: always ports: - - ${URL_INTERNAL}:3003:3003 + - ${URL_INTERNAL}:3013:3013 environment: - URL_INTERNAL=${URL_INTERNAL} - URL_CMS=${URL_CMS} @@ -21,7 +21,7 @@ services: build: ./cms/ restart: always ports: - - ${URL_INTERNAL}:3004:80 + - ${URL_INTERNAL}:3014:80 environment: - ENABLE_CRON=true - APP_DEBUG=false diff --git a/etc/nginx/sites-available/marcleopold b/etc/nginx/sites-available/marcleopold.rayelliott.dev similarity index 54% rename from etc/nginx/sites-available/marcleopold rename to etc/nginx/sites-available/marcleopold.rayelliott.dev index 292430e..0654c5f 100644 --- a/etc/nginx/sites-available/marcleopold +++ b/etc/nginx/sites-available/marcleopold.rayelliott.dev @@ -1,11 +1,34 @@ server { - server_name marcleopold.isnet.uk; + server_name leopold.rayelliott.dev; location / { proxy_buffering off; - proxy_redirect http:://127.0.0.1:3003/ /; - proxy_pass http://127.0.0.1:3003/; + proxy_redirect http:://127.0.0.1:3013/ /; + proxy_pass http://127.0.0.1:3013/; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $remote_addr; + proxy_set_header Host $host; + proxy_set_header X-Forwarded-Host $host; + proxy_set_header X-Forwarded-Proto $scheme; + } + + listen 443 ssl; # managed by Certbot + ssl_certificate /etc/letsencrypt/live/leopold.rayelliott.dev/fullchain.pem; # managed by Certbot + ssl_certificate_key /etc/letsencrypt/live/leopold.rayelliott.dev/privkey.pem; # managed by Certbot + include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot + ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot + +} + +server { + + server_name cms.leopold.rayelliott.dev; + + location / { + proxy_buffering off; + proxy_redirect http:://127.0.0.1:3014/ /; + proxy_pass http://127.0.0.1:3014/; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $remote_addr; proxy_set_header Host $host; @@ -14,60 +37,36 @@ server { } - listen [::]:443 ssl; # managed by Certbot listen 443 ssl; # managed by Certbot - ssl_certificate /etc/letsencrypt/live/marcleopold.isnet.uk/fullchain.pem; # managed by Certbot - ssl_certificate_key /etc/letsencrypt/live/marcleopold.isnet.uk/privkey.pem; # managed by Certbot - include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot - ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot - -} - -server { - - server_name cms.marcleopold.isnet.uk; - - location / { - proxy_buffering off; - proxy_redirect http:://127.0.0.1:3004/ /; - proxy_pass http://127.0.0.1:3004/; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $remote_addr; - proxy_set_header Host $host; - proxy_set_header X-Forwarded-Host $host; - proxy_set_header X-Forwarded-Proto $scheme; - } - - listen [::]:443 ssl ipv6only=on; # managed by Certbot - listen 443 ssl; # managed by Certbot - ssl_certificate /etc/letsencrypt/live/cms.marcleopold.isnet.uk/fullchain.pem; # managed by Certbot - ssl_certificate_key /etc/letsencrypt/live/cms.marcleopold.isnet.uk/privkey.pem; # managed by Certbot + ssl_certificate /etc/letsencrypt/live/cms.leopold.rayelliott.dev/fullchain.pem; # managed by Certbot + ssl_certificate_key /etc/letsencrypt/live/cms.leopold.rayelliott.dev/privkey.pem; # managed by Certbot include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot } server { - if ($host = cms.marcleopold.isnet.uk) { + if ($host = leopold.rayelliott.dev) { return 301 https://$host$request_uri; } # managed by Certbot - listen 80; - listen [::]80; - server_name cms.marcleopold.isnet.uk; + server_name leopold.rayelliott.dev; + listen 80; return 404; # managed by Certbot + + } + server { - if ($host = marcleopold.isnet.uk) { + if ($host = cms.leopold.rayelliott.dev) { return 301 https://$host$request_uri; } # managed by Certbot - listen 80; - listen [::]80; - server_name marcleopold.isnet.uk; + server_name cms.leopold.rayelliott.dev; + listen 80; return 404; # managed by Certbot