diff --git a/Makefile b/Makefile index 4da02af9dc32630bb1a750ef00fbf79df5abab6d..709ebc6cfc83ad9bb5713299359b36f10057e637 100644 --- a/Makefile +++ b/Makefile @@ -1,18 +1,14 @@ -build: - docker build -t kuadradoimg . - run: - docker run -p 80:80 \ - -it \ - --name kuadrado \ - --mount type=bind,source="$(shell pwd)/public",target=/usr/share/nginx/html \ - -d kuadradoimg + docker-compose up -d -start: - docker start kuadrado +run-log: + docker-compose up + +build: + docker-compose up --build -d stop: - docker stop kuadrado + docker-compose down bash: docker exec -it kuadrado bash diff --git a/build.js b/build.js index 90650d3d8b1c8ae8a7b80f1bb376a1b030da8ced..616d21b8e3810200e7f02cf40f077146dc598f8b 100644 --- a/build.js +++ b/build.js @@ -3,14 +3,7 @@ "use strict"; const build_conf = { - protected_dirs: [ - "assets", - "style", - "news-articles", - "game-articles", - "software-articles", - "letsencrypt", - ], + protected_dirs: ["assets", "style", "news-articles", "game-articles", "software-articles"], }; const fs = require("fs"); diff --git a/docker-compose.yml b/docker-compose.yml index d1ff4d22736a63cf45faf1280472d0447e198379..ed08db3acb8e0fa7ce3e126d06b1e63921530b55 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,8 +1,12 @@ version: "3.9" services: - web: - build: . - ports: - - "80:80" - volumes: - - ./public:/usr/share/nginx/html + web: + build: . + container_name: "kuadrado" + ports: + - "80:80" + - "443:443" + volumes: + - ./public:/usr/share/nginx/html + certbot: + image: certbot/certbot diff --git a/nginx.conf b/nginx.conf index d004df3970435ec06c3ef7781b4f2e7be4bc88df..b2afb724cbae4ade79c23d358231877b7b650a15 100644 --- a/nginx.conf +++ b/nginx.conf @@ -29,11 +29,21 @@ http { include /etc/nginx/conf.d/*.conf; server { + listen 80; root /usr/share/nginx/html; index index.html index.htm; server_name kuadrado-software.fr www.kuadrado-software.fr; location / { - add_header "Access-Control-Allow-Origin" "*"; + return 301 https://$host$request_uri; + } + } + + server { + listen 443 ssl; + server_name kuadrado-software.fr www.kuadrado-software.fr; + index index.html index.htm; + location / { + proxy_pass http://kuadrado-software.fr; #for demo purposes } } } diff --git a/public/letsencrypt b/public/letsencrypt deleted file mode 160000 index adb7e5e62f4c96be678c5af3e55a82ddcc717590..0000000000000000000000000000000000000000 --- a/public/letsencrypt +++ /dev/null @@ -1 +0,0 @@ -Subproject commit adb7e5e62f4c96be678c5af3e55a82ddcc717590 diff --git a/public/main.js b/public/main.js index 8999e724602a0d6bf047a277e71adac174e09842..a556592927452bd0e75c31d779e636909cab59b0 100644 --- a/public/main.js +++ b/public/main.js @@ -289,7 +289,6 @@ class HomePage { tag: "div", class: "page-header", contents: [ - {tag:"h1",contents:"AAA"}, { tag: "div", class: "big-logo page-contents-center", diff --git a/src/homepage.js b/src/homepage.js index 333fc88966aa5edf50f8e5b5e27cbfd0216da978..74d591e97009544389e2543fe0d2f75f652cf4cc 100644 --- a/src/homepage.js +++ b/src/homepage.js @@ -18,7 +18,6 @@ class HomePage { tag: "div", class: "page-header", contents: [ - {tag:"h1",contents:"AAA"}, { tag: "div", class: "big-logo page-contents-center",