From bf156c46ad1b2760f193bc672bc49b5d4a754f9c Mon Sep 17 00:00:00 2001 From: quentin Date: Tue, 21 Feb 2023 20:25:42 +0000 Subject: [PATCH] last config --- README.md | 32 +++++++++++++++++--------------- docker-compose.yml | 35 +++++++++++++++++++++++++++++------ nginx.conf | 5 +++++ 3 files changed, 51 insertions(+), 21 deletions(-) diff --git a/README.md b/README.md index 5ac0aba..757ef9a 100644 --- a/README.md +++ b/README.md @@ -377,28 +377,30 @@ See here: https://docs.drone.io/secret/repository/ And then add this to your `.drone.yml`: ```yaml -- name: upload - image: plugins/s3 - settings: - bucket: my-blog - access_key: - from_secret: aws_access_key_id - secret_key: - from_secret: aws_secret_acess_key - source: _site/**/* - target: / + - name: upload + image: plugins/s3 + settings: + bucket: guide + endpoint: http://s3.vimaire.machine.dufour.io + region: garage + access_key: + from_secret: aws_access_key_id + secret_key: + from_secret: aws_secret_acess_key + source: public/**/* + target: / + strip_prefix: public/ ``` ## Profit -Your blog should be available at this URL: http://my-blog.web.localhost:3902 -You can administrate it at this URL: http://my-blog.web.localhost:3902/admin/ -Publishing an article will trigger a build, you can follow it: http://localhost:3002/quentin/my-blog/ +Your blog should be available at this URL: http://guide.web.vimaire.machine.dufour.io +You can administrate it at this URL: http://guide.web.vimaire.machine.dufour.io/admin/ ## TODO - - [ ] Nettoyer les inter-connexions entre les services pour ne pas avoir à drop iptables + - [X] Nettoyer les inter-connexions entre les services pour ne pas avoir à drop iptables -> passé en IPv6 avec un network dédié - [ ] Voir comment speed up le build - [ ] Peut-être passer la démo sur Hugo (aiderait le point précédent) - [ ] Tester avec des templates plus complexes (avec des images en bannière) - - [ ] Porter ce test sur le guide Zola avec les nested collections + - [X] Porter ce test sur le guide Zola avec les nested collections -> Failed, trop buggy encore diff --git a/docker-compose.yml b/docker-compose.yml index 29c1a00..8201fbb 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,5 +1,3 @@ -version: "3.4" - services: reverse: image: nginx:1.23.3 @@ -9,6 +7,9 @@ services: - ./nginx.conf:/etc/nginx/nginx.conf ports: - "80:80" + networks: + localnet: + ipv6_address: fd00::2 links: - "gitea:gitea" - "teabag:teabag" @@ -19,6 +20,9 @@ services: # Patched image required for Gitea version < 1.19 image: superboum/gitea:1.17.4-cors container_name: gitea + networks: + localnet: + ipv6_address: fd00::3 environment: - USER_UID=1000 - USER_GID=1000 @@ -38,19 +42,24 @@ services: - /etc/localtime:/etc/localtime:ro ports: - "2222:22" + teabag: image: ghcr.io/denyskon/teabag:latest container_name: teabag + networks: + localnet: + ipv6_address: fd00::4 restart: always volumes: - ./teabag.env:/etc/teabag/teabag.env - extra_hosts: - - "git.vimaire.machine.dufour.io:192.168.1.107" drone: image: drone/drone:2 container_name: drone restart: always + networks: + localnet: + ipv6_address: fd00::5 environment: - DRONE_GITEA_CLIENT_ID=c0f72ac9-defc-4c0e-a118-9ac36f1f336a - DRONE_GITEA_CLIENT_SECRET=gto_fillslosv252xrb7mpkgo5k6boktyw4vtympxlwyzsydeuwuqaia @@ -59,13 +68,16 @@ services: - DRONE_SERVER_HOST=drone.vimaire.machine.dufour.io - DRONE_SERVER_PROTO=http - DRONE_SERVER_PORT=:3002 - extra_hosts: - - "git.vimaire.machine.dufour.io:192.168.1.107" + volumes: + - ./drone:/data runner: image: drone/drone-runner-docker:1 container_name: runner restart: always + networks: + localnet: + ipv6_address: fd00::6 environment: - DRONE_RPC_PROTO=http - DRONE_RPC_HOST=drone.vimaire.machine.dufour.io @@ -73,6 +85,7 @@ services: - DRONE_RUNNER_CAPACITY=1 - DRONE_RUNNER_NAME=dummy - DRONE_HTTP_BIND=3003 + - DRONE_RUNNER_NETWORKS=static-publishing-platform_localnet volumes: - /var/run/docker.sock:/var/run/docker.sock @@ -80,7 +93,17 @@ services: image: dxflrs/garage:v0.8.1 container_name: garage restart: always + networks: + localnet: + ipv6_address: fd00::7 volumes: - ./garage.toml:/etc/garage.toml - ./garage:/var/lib/garage/ +networks: + localnet: + enable_ipv6: true + ipam: + driver: default + config: + - subnet: "fd00::/64" diff --git a/nginx.conf b/nginx.conf index 8b20513..4f7e123 100644 --- a/nginx.conf +++ b/nginx.conf @@ -36,6 +36,7 @@ http { server { listen 80; + listen [::]:80; client_max_body_size 0; server_name git.vimaire.machine.dufour.io; @@ -50,6 +51,7 @@ http { server { listen 80; + listen [::]:80; client_max_body_size 0; server_name teabag.vimaire.machine.dufour.io; @@ -65,6 +67,7 @@ http { server { listen 80; + listen [::]:80; client_max_body_size 0; server_name drone.vimaire.machine.dufour.io; @@ -80,6 +83,7 @@ http { server { listen 80; + listen [::]:80; client_max_body_size 0; server_name *.web.vimaire.machine.dufour.io; @@ -96,6 +100,7 @@ http { server { listen 80; + listen [::]:80; client_max_body_size 0; server_name *.s3.vimaire.machine.dufour.io s3.vimaire.machine.dufour.io;