many things

This commit is contained in:
Quentin 2023-02-21 17:35:34 +00:00
parent 22d665bbe1
commit cc6f1d4952
5 changed files with 30 additions and 16 deletions

View file

@ -12,6 +12,11 @@ based on:
- Drone: https://github.com/harness/drone - Drone: https://github.com/harness/drone
- Garage: https://git.deuxfleurs.fr/Deuxfleurs/garage/ - Garage: https://git.deuxfleurs.fr/Deuxfleurs/garage/
## DNS
Configure a CNAME wildcard pointing to your deployment machine.
My wildcard is : `*.vimaire.machine.dufour.io`.
## Launch the reverse proxy ## Launch the reverse proxy
``` ```
@ -41,10 +46,10 @@ you must instead use a patched image to allow the custom header
Now you are ready to start your gitea instance: Now you are ready to start your gitea instance:
``` ```
docker-compose up -d docker-compose up -d gitea
``` ```
Now go to `http://localhost:3000` and configure your Gitea instance. Now go to `http://git.vimaire.machine.dufour.io` and configure your Gitea instance.
Create an administrator account by unfolding the last section. Create an administrator account by unfolding the last section.
## Install Teabag ## Install Teabag

View file

@ -9,6 +9,11 @@ services:
- ./nginx.conf:/etc/nginx/nginx.conf - ./nginx.conf:/etc/nginx/nginx.conf
ports: ports:
- "80:80" - "80:80"
links:
- "gitea:gitea"
- "teabag:teabag"
- "garage:garage"
- "drone:drone"
gitea: gitea:
# Patched image required for Gitea version < 1.19 # Patched image required for Gitea version < 1.19
@ -39,19 +44,23 @@ services:
restart: always restart: always
volumes: volumes:
- ./teabag.env:/etc/teabag/teabag.env - ./teabag.env:/etc/teabag/teabag.env
extra_hosts:
- "git.vimaire.machine.dufour.io:192.168.1.107"
drone: drone:
image: drone/drone:2 image: drone/drone:2
container_name: drone container_name: drone
restart: always restart: always
environment: environment:
- DRONE_GITEA_CLIENT_ID=2ede47ba-c943-48ad-8f7b-987df45983ee - DRONE_GITEA_CLIENT_ID=c0f72ac9-defc-4c0e-a118-9ac36f1f336a
- DRONE_GITEA_CLIENT_SECRET=gto_vvj5e4fjvg6s3zeu4plgolvx2erowjvcp5bzhfo4c76v7bn466pa - DRONE_GITEA_CLIENT_SECRET=gto_fillslosv252xrb7mpkgo5k6boktyw4vtympxlwyzsydeuwuqaia
- DRONE_GITEA_SERVER=http://git.vimaire.machine.dufour.io - DRONE_GITEA_SERVER=http://git.vimaire.machine.dufour.io
- DRONE_RPC_SECRET=EJPRnOcjAoKxAShyBTdeDX4GSHRUX4FzuIJKohTEw10= - DRONE_RPC_SECRET=EJPRnOcjAoKxAShyBTdeDX4GSHRUX4FzuIJKohTEw10=
- DRONE_SERVER_HOST=drone.vimaire.machine.dufour.io - DRONE_SERVER_HOST=drone.vimaire.machine.dufour.io
- DRONE_SERVER_PROTO=http - DRONE_SERVER_PROTO=http
- DRONE_SERVER_PORT=:3002 - DRONE_SERVER_PORT=:3002
extra_hosts:
- "git.vimaire.machine.dufour.io:192.168.1.107"
runner: runner:
image: drone/drone-runner-docker:1 image: drone/drone-runner-docker:1
@ -73,4 +82,5 @@ services:
restart: always restart: always
volumes: volumes:
- ./garage.toml:/etc/garage.toml - ./garage.toml:/etc/garage.toml
- ./garage:/var/lib/garage/

View file

@ -4,22 +4,22 @@ db_engine = "lmdb"
replication_mode = "none" replication_mode = "none"
rpc_bind_addr = "[::]:3901" rpc_bind_addr = "0.0.0.0:3901"
rpc_public_addr = "127.0.0.1:3901" rpc_public_addr = "127.0.0.1:3901"
rpc_secret = "9ec6d97e54b2a55e939f0ba761ba565595691f0d42eb6511f4cb6cb69e906cad" rpc_secret = "9ec6d97e54b2a55e939f0ba761ba565595691f0d42eb6511f4cb6cb69e906cad"
[s3_api] [s3_api]
s3_region = "garage" s3_region = "garage"
api_bind_addr = "[::]:3900" api_bind_addr = "0.0.0.0:3900"
root_domain = ".s3.vimaire.machine.dufour.io" root_domain = ".s3.vimaire.machine.dufour.io"
[s3_web] [s3_web]
bind_addr = "[::]:3902" bind_addr = "0.0.0.0:3902"
root_domain = ".web.vimaire.machine.dufour.io" root_domain = ".web.vimaire.machine.dufour.io"
index = "index.html" index = "index.html"
[k2v_api] [k2v_api]
api_bind_addr = "[::]:3904" api_bind_addr = "0.0.0.0:3904"
[admin] [admin]
api_bind_addr = "0.0.0.0:3903" api_bind_addr = "0.0.0.0:3903"

View file

@ -12,6 +12,7 @@ http {
tcp_nodelay on; tcp_nodelay on;
keepalive_timeout 65; keepalive_timeout 65;
types_hash_max_size 2048; types_hash_max_size 2048;
resolver 127.0.0.11;
# mimetypes, required by jitsi! # mimetypes, required by jitsi!
@ -42,7 +43,6 @@ http {
location / { location / {
set $upstream http://gitea:3000; set $upstream http://gitea:3000;
proxy_pass $upstream; proxy_pass $upstream;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header X-Forwarded-Proto $scheme; proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-Host $host; proxy_set_header X-Forwarded-Host $host;
} }
@ -85,8 +85,9 @@ http {
server_name *.web.vimaire.machine.dufour.io; server_name *.web.vimaire.machine.dufour.io;
location / { location / {
set $upstream http://garage:3002; set $upstream http://garage:3902;
proxy_pass $upstream; proxy_pass $upstream;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $remote_addr; proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header X-Forwarded-Proto $scheme; proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-Host $host; proxy_set_header X-Forwarded-Host $host;
@ -97,14 +98,12 @@ http {
listen 80; listen 80;
client_max_body_size 0; client_max_body_size 0;
server_name *.s3.vimaire.machine.dufour.io; server_name *.s3.vimaire.machine.dufour.io s3.vimaire.machine.dufour.io;
location / { location / {
set $upstream http://garage:3900; set $upstream http://garage:3900;
proxy_pass $upstream; proxy_pass $upstream;
proxy_set_header X-Forwarded-For $remote_addr; proxy_set_header Host $host;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-Host $host;
} }
} }
} }

View file

@ -2,8 +2,8 @@ HOST=0.0.0.0
PORT=3001 PORT=3001
SESSION_SECRET=uLCe67uvUpaI/U3c0yBzzFxJliY80BQHU/l9FZrkN38= SESSION_SECRET=uLCe67uvUpaI/U3c0yBzzFxJliY80BQHU/l9FZrkN38=
GITEA_KEY=968c9d5a-8b4e-4091-b48d-cc5d0888680d GITEA_KEY=4fea0701-3711-4ce0-8446-144642bed331
GITEA_SECRET=gto_65p4gglq5au4mtvtpq7xcnlyonfyvphlwixhhkni6aql5yd3ovcq GITEA_SECRET=gto_bz6f5w6d7lhcslrlcmt4xvph2m4p6lppdu72b3awod675tvx74bq
GITEA_BASE_URL=http://git.vimaire.machine.dufour.io GITEA_BASE_URL=http://git.vimaire.machine.dufour.io
GITEA_AUTH_URI=login/oauth/authorize GITEA_AUTH_URI=login/oauth/authorize
GITEA_TOKEN_URI=login/oauth/access_token GITEA_TOKEN_URI=login/oauth/access_token