diff --git a/.env-production b/.env-production index 77426e0..b467ba2 100644 --- a/.env-production +++ b/.env-production @@ -1,4 +1,4 @@ -URL_INTERNAL=0.0.0.0 -URL_EXTERNAL=cms.marcleopold.inset.uk +URL_INTERNAL=127.0.0.1 +URL_EXTERNAL=https://cms.marcleopold.isnet.uk PORT_APP=3003 PORT_SERVER=3004 diff --git a/.gitignore b/.gitignore index 4eacd45..75391c2 100644 --- a/.gitignore +++ b/.gitignore @@ -80,3 +80,4 @@ dist # IDE .idea Session.vim +*.un~ diff --git a/app/Dockerfile b/app/Dockerfile index e61e99d..e091cce 100644 --- a/app/Dockerfile +++ b/app/Dockerfile @@ -8,6 +8,6 @@ ADD . ${APP_ROOT} RUN npm install RUN npm rebuild node-sass -# RUN npm run build +RUN npm run build ENV HOST 0.0.0.0 diff --git a/app/nuxt.config.js b/app/nuxt.config.js index b6641a6..d92c008 100644 --- a/app/nuxt.config.js +++ b/app/nuxt.config.js @@ -5,7 +5,7 @@ module.exports = { server: { port: process.env.PORT_APP, - host: process.env.URL_INTERNAL, + host: '0.0.0.0', }, serverMiddleware: [ diff --git a/docker-compose.yml b/docker-compose.yml index 0a6750a..2b9618b 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -13,7 +13,7 @@ services: - PORT_APP=${PORT_APP} - PORT_SERVER=${PORT_SERVER} command: - "npm run dev" + "npm run start" octobercms: image: aspendigital/octobercms:latest @@ -25,6 +25,8 @@ services: - ENABLE_CRON=true - APP_DEBUG=false - INIT_PLUGINS=true + - APP_URL=${URL_EXTERNAL} + - CMS_LINK_POLICY=force volumes: - ./server/plugins:/var/www/html/plugins - ./server/storage/app:/var/www/html/storage/app diff --git a/etc/nginx/sites-available/marcleopold b/etc/nginx/sites-available/marcleopold index 8f92c50..9dde7f3 100644 --- a/etc/nginx/sites-available/marcleopold +++ b/etc/nginx/sites-available/marcleopold @@ -1,3 +1,22 @@ +server { + listen 80; + listen [::]80; + + server_name marcleopold.isnet.uk; + + location / { + proxy_buffering off; + proxy_redirect http:://127.0.0.1:3003/ /; + proxy_pass http://127.0.0.1:3003/; + 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; + } + +} + server { server_name cms.marcleopold.isnet.uk; @@ -33,22 +52,3 @@ server { server_name cms.marcleopold.isnet.uk; return 404; # managed by Certbot } - -server { - listen 80; - listen [::]80; - - server_name marcleopold.isnet.uk; - - location / { - proxy_buffering off; - proxy_redirect http:://127.0.0.1:3003/ /; - proxy_pass http://127.0.0.1:3003/; - 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; - } - -} diff --git a/server/storage/database.sqlite b/server/storage/database.sqlite index 434db21..e82d0a2 100755 Binary files a/server/storage/database.sqlite and b/server/storage/database.sqlite differ