From 10ea018e6817173061ddd4d3b0db93186b0c6198 Mon Sep 17 00:00:00 2001 From: ray Date: Mon, 25 Feb 2019 23:05:03 +0200 Subject: [PATCH] frontend working --- .env-production | 4 +-- .gitignore | 1 + app/Dockerfile | 2 +- app/nuxt.config.js | 2 +- docker-compose.yml | 4 ++- etc/nginx/sites-available/marcleopold | 38 +++++++++++++------------- server/storage/database.sqlite | Bin 458752 -> 458752 bytes 7 files changed, 27 insertions(+), 24 deletions(-) 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 434db21ad9a9bd8e2bac0a2be18e9cd5f91e617b..e82d0a2b1ebe3a33b077f2ea8277dd195a0a8f5e 100755 GIT binary patch delta 662 zcmZo@kZEX;nIO$*J5k1&(RO3PB6$fT1}?sr4E!JXukcIrFXiv$FXd0>d&%#;S>V8V zK2}K%W^=~r6P7TEGBQtQ(bqHN-^U=ynUt8Eotl>tpO~DST3j5Tlb_DNPmGhROrZ8yOVronBUMk&~aD;*y>fl#_2-5$5Dq6q=i= zVpOSOXrPiFl2T|~o*3?B7M|qnmXej0V_@LoZyHb%6jgW#OG-nVn^-7vdTo zQR(cV?`-7EWMp7yscT@QYh=kWUQ!fB3)ie*zlvgkOe*nUj$jL@+Tkb8>=Q zz|4Pv0cgob{`)``hxirwm=zfj#xn~tt1}uRo6EHQV?DF50?_0@2L9vxJ^X<{ea`&# zmdtEGhZq~9C`Jhah_A5-SuzpUYG`F@jHVSNWX=fGstmNX{la=?AZ7t#*6kP8vl#>c E0IUJ13jhEB delta 389 zcmZo@kZEX;nIO$*G*QNx(P(4BB6*2@3|#yy4E!JXukcIrFXiv$FXd0>_vAO)EO6iz z-((hjJsD9>W<$=T#N_PMyp;IFoaao)@NGW zz#_)LFSc3GfQO%>F`ZGAL0nRNy25@YY1YJ)+|0b`cKeyc>m!|<%=|3F!-9-5L-Yd7 zgS?zQvJ3Rgd`gmoJd=&h^vsKceUgK{jSDJ@k}5p1D-6AgQoL1+Dpd>(RKjx0^eoE_ z&Adv&lgl!ajFT-23i9=$O58$>lgfiCEsPz5BZA$Ng9{6T!;%Y~@`K94GZLAM3=A!G z4UBY+Oce~xSglNrtc<4L+|Q&SXa;5*aWOD3F!FzA;QtPE`dfZZ4rXyqu!FZV!Z