Compare commits
85 commits
c8e3c49ed7
...
9a3029bb77
Author | SHA1 | Date | |
---|---|---|---|
9a3029bb77 | |||
0254246352 | |||
c17a178e72 | |||
e4037e808a | |||
a0299a877a | |||
7e3041f7cc | |||
7e87d0e4e0 | |||
eac8c33833 | |||
80915e0959 | |||
cdb9681c3e | |||
3986eaefe5 | |||
efb5998fdc | |||
1ae24a408f | |||
48ca0d0c9e | |||
8c00972731 | |||
16b4aa5b1e | |||
60cb231f97 | |||
e51621fe98 | |||
99afc04309 | |||
5951260f56 | |||
d56fb3c174 | |||
f5da5ecdf0 | |||
e576fb0801 | |||
33b553f87e | |||
2d140808ff | |||
6ac144a04d | |||
bf55560ffb | |||
27cebc8f4c | |||
0bc67480a4 | |||
726a26e0e8 | |||
3968bc629e | |||
10c244917b | |||
719970caa2 | |||
a25a9dd44c | |||
869c1511af | |||
677d38a854 | |||
3effe11ff6 | |||
8df5b83f7f | |||
c52631e246 | |||
61387dd545 | |||
fac79e87ae | |||
bf9e076439 | |||
a3b7ccb31b | |||
2133d5111b | |||
e5f9ddb713 | |||
6a9bd0f23b | |||
35377aa6b1 | |||
2af53ff081 | |||
7dd106949d | |||
f897019a0b | |||
0aee543611 | |||
aa24c8afeb | |||
260e4e9854 | |||
0709fabe1d | |||
93c7fe3e66 | |||
adc074cf77 | |||
bc76c0e099 | |||
01b4c53b4f | |||
94d7f1bf19 | |||
7044cbbc30 | |||
e7ee10b5d6 | |||
628edb7484 | |||
5836973c63 | |||
d9430457a8 | |||
a1572868a1 | |||
3b32f2b1e3 | |||
1bcb9e59c9 | |||
3bfd1eeec2 | |||
9930fd42bd | |||
437c8f8ae3 | |||
cbe1d5b699 | |||
5eb02eba76 | |||
79e23b74af | |||
fa5a707898 | |||
27bca8495b | |||
00de7abe16 | |||
95f5c919f1 | |||
ec22cbb365 | |||
6d3def79f6 | |||
4dd9498811 | |||
0dded1a072 | |||
b573b4cb85 | |||
c492de29d9 | |||
fff7b70527 | |||
87560edbc4 |
23 changed files with 109 additions and 38 deletions
.ci
.gitignore.woodpecker
README.mdcompute-1-mep
forgejo
renovate
searx
wallabag
wiki
compute-2-mep
gitlab
mastodon
ofelia
vaultwarden
woodpecker
internals
semaphore
wikijs
woodpecker-worker
woodpecker
28
.ci/gen_output.sh
Executable file
28
.ci/gen_output.sh
Executable file
|
@ -0,0 +1,28 @@
|
||||||
|
echo "\`\`\`" > output.txt
|
||||||
|
|
||||||
|
process_output() {
|
||||||
|
if [ $? -eq 0 ]; then
|
||||||
|
head -n 5 output_tmp.txt >> output.txt
|
||||||
|
echo "... [See pipeline output for full details]" >> output.txt
|
||||||
|
tail -n 5 output_tmp.txt >> output.txt
|
||||||
|
else
|
||||||
|
cat output_tmp.txt >> output.txt
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
echo "-- START Port attribution watcher --" | tee -a output.txt
|
||||||
|
python3 .ci/port_attribution_watcher.py | tee output_tmp.txt
|
||||||
|
|
||||||
|
process_output
|
||||||
|
|
||||||
|
echo "-- END Port attribution watcher --" | tee -a output.txt
|
||||||
|
echo "" >> output.txt
|
||||||
|
echo "-- START Traefik label watcher --" | tee -a output.txt
|
||||||
|
|
||||||
|
python3 .ci/traefik_label_watcher.py | tee output_tmp.txt
|
||||||
|
|
||||||
|
process_output
|
||||||
|
|
||||||
|
echo "-- END Traefik label watcher --" | tee -a output.txt
|
||||||
|
echo "\`\`\`" >> output.txt # Close the code block
|
||||||
|
|
0
.ci/lint.sh
Normal file → Executable file
0
.ci/lint.sh
Normal file → Executable file
11
.ci/lint_wrap.sh
Executable file
11
.ci/lint_wrap.sh
Executable file
|
@ -0,0 +1,11 @@
|
||||||
|
set -o pipefail
|
||||||
|
sh .ci/lint.sh 2>&1 | tee output_tmp.txt
|
||||||
|
EXIT_CODE=$?
|
||||||
|
echo "\`\`\`" > output.txt
|
||||||
|
|
||||||
|
grep -n 'msg=' output_tmp.txt | awk -F'msg="' '{print $2}' | sed 's/"$//' | sed 's/\\"/"/g' >> output.txt
|
||||||
|
grep -v 'msg=' output_tmp.txt >> output.txt
|
||||||
|
|
||||||
|
echo "\`\`\`" >> output.txt
|
||||||
|
echo "END"
|
||||||
|
exit $EXIT_CODE
|
|
@ -52,25 +52,20 @@ def main(watchFolder: str):
|
||||||
# Get exposed ports
|
# Get exposed ports
|
||||||
exposedPorts = getExposedPortsFromDockerComposeFile(dockerComposeFile)
|
exposedPorts = getExposedPortsFromDockerComposeFile(dockerComposeFile)
|
||||||
ports[dockerComposeFile] = exposedPorts
|
ports[dockerComposeFile] = exposedPorts
|
||||||
if len(exposedPorts) == 0:
|
if len(exposedPorts) != 0:
|
||||||
print(f"\n📦 {dockerComposeFile}"
|
print(f"\n📦 {dockerComposeFile}"
|
||||||
f"\n🔴 No exposed ports found"
|
f"\n🔗 Exposed ports: {exposedPorts}")
|
||||||
f"\n")
|
|
||||||
else:
|
|
||||||
print(f"\n📦 {dockerComposeFile}"
|
|
||||||
f"\n🔗 Exposed ports: {exposedPorts}"
|
|
||||||
f"\n")
|
|
||||||
|
|
||||||
wrong = checkPortUnique(ports)
|
wrong = checkPortUnique(ports)
|
||||||
|
|
||||||
if wrong:
|
if wrong:
|
||||||
exit(1)
|
exit(1)
|
||||||
else:
|
else:
|
||||||
print("\n\n✅ All ports are unique\n\n")
|
print("\n✅ All ports are unique")
|
||||||
exit(0)
|
exit(0)
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
print("Traefik label watcher CI/CD")
|
print("Port Attribution Watcher")
|
||||||
# Read folder from env
|
# Read folder from env
|
||||||
watchFolder = os.getenv("WATCH_FOLDER")
|
watchFolder = os.getenv("WATCH_FOLDER")
|
||||||
if watchFolder == None:
|
if watchFolder == None:
|
||||||
|
|
1
.ci/requirements.txt
Normal file
1
.ci/requirements.txt
Normal file
|
@ -0,0 +1 @@
|
||||||
|
pyyaml==6.0.2
|
|
@ -85,7 +85,7 @@ def main(watchFolder: str):
|
||||||
if wrong:
|
if wrong:
|
||||||
exit(1)
|
exit(1)
|
||||||
else:
|
else:
|
||||||
print("\n\n✅ All routers are unique\n\n")
|
print("\n\n✅ All routers are unique")
|
||||||
exit(0)
|
exit(0)
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
|
3
.gitignore
vendored
3
.gitignore
vendored
|
@ -1,2 +1,3 @@
|
||||||
.vscode
|
.vscode
|
||||||
.env.priv
|
.env.priv
|
||||||
|
.venv
|
|
@ -1,14 +1,38 @@
|
||||||
steps:
|
steps:
|
||||||
lint:
|
check_ports_labels:
|
||||||
image: debian:stable-slim
|
image: python:3.13-slim
|
||||||
commands:
|
commands:
|
||||||
|
- pip3 install -r .ci/requirements.txt
|
||||||
|
- ./.ci/gen_output.sh
|
||||||
|
comment:
|
||||||
|
image: git.gnous.eu/enpls/gitea-comment-plugin:1.1
|
||||||
|
settings:
|
||||||
|
gitea_address: https://git.gnous.eu
|
||||||
|
gitea_token:
|
||||||
|
from_secret: gnous_cicd_token
|
||||||
|
comment_file: output.txt
|
||||||
|
when:
|
||||||
|
status: [failure, success]
|
||||||
|
event: [pull_request]
|
||||||
|
lint:
|
||||||
|
image: debian:stable
|
||||||
|
commands:
|
||||||
|
- rm -rf output.txt
|
||||||
- apt-get update
|
- apt-get update
|
||||||
- apt-get install -y curl
|
- apt-get install -y curl
|
||||||
- curl -SL https://github.com/docker/compose/releases/download/v2.20.3/docker-compose-linux-x86_64 -o /usr/local/bin/docker-compose
|
- curl -SL https://github.com/docker/compose/releases/download/v2.20.3/docker-compose-linux-x86_64 -o /usr/local/bin/docker-compose
|
||||||
- chmod +x //usr/local/bin/docker-compose
|
- chmod +x /usr/local/bin/docker-compose
|
||||||
- sh .ci/lint.sh
|
- bash .ci/lint_wrap.sh
|
||||||
when:
|
comment_2:
|
||||||
- event: pull_request
|
image: git.gnous.eu/enpls/gitea-comment-plugin:1.1
|
||||||
repo: gnouseu/docker-services
|
settings:
|
||||||
- event: push
|
gitea_address: https://git.gnous.eu
|
||||||
branch: main
|
gitea_token:
|
||||||
|
from_secret: gnous_cicd_token
|
||||||
|
comment_file: output.txt
|
||||||
|
when:
|
||||||
|
status: [failure, success]
|
||||||
|
event: [pull_request]
|
||||||
|
when:
|
||||||
|
- event: [push, pull_request]
|
||||||
|
- evaluate: 'CI_COMMIT_AUTHOR in ["gnous-ci-bot", "mael", "ada"]'
|
13
README.md
13
README.md
|
@ -1,3 +1,14 @@
|
||||||
# Services Gnous
|
# Services Gnous
|
||||||
|
|
||||||
L'ensemble des docker compose pour les services du projet Gnous.
|
L'ensemble des docker compose pour les services du projet Gnous.
|
||||||
|
|
||||||
|
## Lint
|
||||||
|
|
||||||
|
```
|
||||||
|
python3 -m venv .venv/
|
||||||
|
source .venv/bin/activate
|
||||||
|
pip install -r .ci/requirements.txt
|
||||||
|
python3 .ci/port_attribution_watcher.py
|
||||||
|
python3 .ci/traefik_label_watcher.py
|
||||||
|
./.ci/lint.sh
|
||||||
|
```
|
|
@ -9,7 +9,7 @@ volumes:
|
||||||
|
|
||||||
services:
|
services:
|
||||||
server:
|
server:
|
||||||
image: codeberg.org/forgejo/forgejo:9.0.3
|
image: codeberg.org/forgejo/forgejo:10.0.1
|
||||||
restart: always
|
restart: always
|
||||||
container_name: forgejo
|
container_name: forgejo
|
||||||
env_file:
|
env_file:
|
||||||
|
|
|
@ -4,7 +4,7 @@ networks:
|
||||||
|
|
||||||
services:
|
services:
|
||||||
renovate:
|
renovate:
|
||||||
image: ghcr.io/renovatebot/renovate:39.86.2-full
|
image: ghcr.io/renovatebot/renovate:39.170.2-full
|
||||||
restart: always
|
restart: always
|
||||||
environment:
|
environment:
|
||||||
- LOG_LEVEL=info
|
- LOG_LEVEL=info
|
||||||
|
|
|
@ -8,7 +8,7 @@ volumes:
|
||||||
|
|
||||||
services:
|
services:
|
||||||
server:
|
server:
|
||||||
image: "searxng/searxng:2024.10.4-3e747d049"
|
image: "searxng/searxng:2025.1.6-6dab7fe78"
|
||||||
depends_on:
|
depends_on:
|
||||||
- "redis"
|
- "redis"
|
||||||
environment:
|
environment:
|
||||||
|
|
|
@ -8,7 +8,7 @@ volumes:
|
||||||
|
|
||||||
services:
|
services:
|
||||||
wallabag:
|
wallabag:
|
||||||
image: wallabag/wallabag
|
image: wallabag/wallabag:2.6.10
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
environment:
|
environment:
|
||||||
- SYMFONY__ENV__DATABASE_DRIVER=pdo_pgsql
|
- SYMFONY__ENV__DATABASE_DRIVER=pdo_pgsql
|
||||||
|
|
|
@ -7,7 +7,7 @@ services:
|
||||||
image: git.gnous.eu/gnouseu/wiki:v3
|
image: git.gnous.eu/gnouseu/wiki:v3
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
ports:
|
ports:
|
||||||
- "3005:80"
|
- "3010:80"
|
||||||
labels:
|
labels:
|
||||||
- "traefik.enable=true"
|
- "traefik.enable=true"
|
||||||
- "traefik.http.routers.wiki.entryPoints=websecure"
|
- "traefik.http.routers.wiki.entryPoints=websecure"
|
||||||
|
|
|
@ -12,7 +12,7 @@ volumes:
|
||||||
|
|
||||||
services:
|
services:
|
||||||
gitlab:
|
gitlab:
|
||||||
image: gitlab/gitlab-ce:17.7.0-ce.0
|
image: gitlab/gitlab-ce:17.9.0-ce.0
|
||||||
container_name: gitlab
|
container_name: gitlab
|
||||||
restart: always
|
restart: always
|
||||||
hostname: "gitlab.gnous.eu"
|
hostname: "gitlab.gnous.eu"
|
||||||
|
|
|
@ -13,7 +13,7 @@ services:
|
||||||
- mastodon
|
- mastodon
|
||||||
|
|
||||||
web:
|
web:
|
||||||
image: ghcr.io/mastodon/mastodon:v4.3.2
|
image: ghcr.io/mastodon/mastodon:v4.3.3
|
||||||
restart: always
|
restart: always
|
||||||
env_file:
|
env_file:
|
||||||
- path: .env.production
|
- path: .env.production
|
||||||
|
@ -44,7 +44,7 @@ services:
|
||||||
- "ofelia.job-exec.clean-account.command=tootctl accounts cull"
|
- "ofelia.job-exec.clean-account.command=tootctl accounts cull"
|
||||||
|
|
||||||
streaming:
|
streaming:
|
||||||
image: ghcr.io/mastodon/mastodon-streaming:v4.3.2
|
image: ghcr.io/mastodon/mastodon-streaming:v4.3.3
|
||||||
restart: always
|
restart: always
|
||||||
env_file:
|
env_file:
|
||||||
- path: .env.production
|
- path: .env.production
|
||||||
|
@ -70,7 +70,7 @@ services:
|
||||||
- "traefik.http.routers.mastodon-streaming.middlewares=proxyHeader@file,proxyError@file"
|
- "traefik.http.routers.mastodon-streaming.middlewares=proxyHeader@file,proxyError@file"
|
||||||
|
|
||||||
sidekiq:
|
sidekiq:
|
||||||
image: ghcr.io/mastodon/mastodon:v4.3.2
|
image: ghcr.io/mastodon/mastodon:v4.3.3
|
||||||
restart: always
|
restart: always
|
||||||
env_file:
|
env_file:
|
||||||
- path: .env.production
|
- path: .env.production
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
services:
|
services:
|
||||||
ofelia:
|
ofelia:
|
||||||
image: mcuadros/ofelia:0.3.14
|
image: mcuadros/ofelia:v3.0.8
|
||||||
command: daemon --docker
|
command: daemon --docker
|
||||||
volumes:
|
volumes:
|
||||||
- /var/run/docker.sock:/var/run/docker.sock:ro
|
- /var/run/docker.sock:/var/run/docker.sock:ro
|
||||||
|
|
|
@ -8,7 +8,7 @@ volumes:
|
||||||
|
|
||||||
services:
|
services:
|
||||||
vaultwarden:
|
vaultwarden:
|
||||||
image: vaultwarden/server:1.32.7
|
image: vaultwarden/server:1.33.2
|
||||||
container_name: vaultwarden
|
container_name: vaultwarden
|
||||||
environment:
|
environment:
|
||||||
- WEBSOCKET_ENABLED=true # Enable WebSocket notifications.
|
- WEBSOCKET_ENABLED=true # Enable WebSocket notifications.
|
||||||
|
|
|
@ -9,7 +9,7 @@ volumes:
|
||||||
|
|
||||||
services:
|
services:
|
||||||
server:
|
server:
|
||||||
image: woodpeckerci/woodpecker-server:v2.8.2
|
image: woodpeckerci/woodpecker-server:v3.1.0
|
||||||
container_name: woodpecker_server
|
container_name: woodpecker_server
|
||||||
environment:
|
environment:
|
||||||
- WOODPECKER_OPEN=true
|
- WOODPECKER_OPEN=true
|
||||||
|
|
|
@ -14,7 +14,7 @@ services:
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
ports:
|
ports:
|
||||||
- 8085:3000
|
- 8085:3000
|
||||||
image: semaphoreui/semaphore:v2.11.2
|
image: semaphoreui/semaphore:v2.12.14
|
||||||
env_file:
|
env_file:
|
||||||
- .env
|
- .env
|
||||||
environment:
|
environment:
|
||||||
|
|
|
@ -10,7 +10,7 @@ services:
|
||||||
- db-data:/var/lib/postgresql/data
|
- db-data:/var/lib/postgresql/data
|
||||||
|
|
||||||
server:
|
server:
|
||||||
image: ghcr.io/requarks/wiki:2.5.305
|
image: ghcr.io/requarks/wiki:2.5.306
|
||||||
depends_on:
|
depends_on:
|
||||||
- db
|
- db
|
||||||
environment:
|
environment:
|
||||||
|
|
|
@ -4,7 +4,7 @@ volumes:
|
||||||
|
|
||||||
services:
|
services:
|
||||||
agent:
|
agent:
|
||||||
image: woodpeckerci/woodpecker-agent:latest
|
image: woodpeckerci/woodpecker-agent:next
|
||||||
container_name: woodpecker_agent
|
container_name: woodpecker_agent
|
||||||
environment:
|
environment:
|
||||||
- WOODPECKER_SERVER=grpc.build.net.enpls.org:443
|
- WOODPECKER_SERVER=grpc.build.net.enpls.org:443
|
||||||
|
|
|
@ -10,7 +10,7 @@ volumes:
|
||||||
|
|
||||||
services:
|
services:
|
||||||
server:
|
server:
|
||||||
image: woodpeckerci/woodpecker-server:v2.8.2
|
image: woodpeckerci/woodpecker-server:v3.1.0
|
||||||
container_name: woodpecker_server
|
container_name: woodpecker_server
|
||||||
environment:
|
environment:
|
||||||
- WOODPECKER_OPEN=false
|
- WOODPECKER_OPEN=false
|
||||||
|
@ -53,7 +53,7 @@ services:
|
||||||
- "traefik.http.routers.woodpecker-grpc-secure.entrypoints=websecure"
|
- "traefik.http.routers.woodpecker-grpc-secure.entrypoints=websecure"
|
||||||
- "traefik.http.routers.woodpecker-grpc-secure.service=woodpecker-grpc"
|
- "traefik.http.routers.woodpecker-grpc-secure.service=woodpecker-grpc"
|
||||||
- "traefik.http.routers.woodpecker-grpc.middlewares=woodpecker-grpc-redirect@docker"
|
- "traefik.http.routers.woodpecker-grpc.middlewares=woodpecker-grpc-redirect@docker"
|
||||||
- "traefik.http.routers.gnousdoteu.middlewares=proxyHeader@file,proxyError@file"
|
- "traefik.http.routers.woodpecker-grpc.middlewares=proxyHeader@file,proxyError@file"
|
||||||
depends_on:
|
depends_on:
|
||||||
- db
|
- db
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue