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
|
||||
exposedPorts = getExposedPortsFromDockerComposeFile(dockerComposeFile)
|
||||
ports[dockerComposeFile] = exposedPorts
|
||||
if len(exposedPorts) == 0:
|
||||
if len(exposedPorts) != 0:
|
||||
print(f"\n📦 {dockerComposeFile}"
|
||||
f"\n🔴 No exposed ports found"
|
||||
f"\n")
|
||||
else:
|
||||
print(f"\n📦 {dockerComposeFile}"
|
||||
f"\n🔗 Exposed ports: {exposedPorts}"
|
||||
f"\n")
|
||||
f"\n🔗 Exposed ports: {exposedPorts}")
|
||||
|
||||
wrong = checkPortUnique(ports)
|
||||
|
||||
if wrong:
|
||||
exit(1)
|
||||
else:
|
||||
print("\n\n✅ All ports are unique\n\n")
|
||||
print("\n✅ All ports are unique")
|
||||
exit(0)
|
||||
|
||||
if __name__ == "__main__":
|
||||
print("Traefik label watcher CI/CD")
|
||||
print("Port Attribution Watcher")
|
||||
# Read folder from env
|
||||
watchFolder = os.getenv("WATCH_FOLDER")
|
||||
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:
|
||||
exit(1)
|
||||
else:
|
||||
print("\n\n✅ All routers are unique\n\n")
|
||||
print("\n\n✅ All routers are unique")
|
||||
exit(0)
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
|
3
.gitignore
vendored
3
.gitignore
vendored
|
@ -1,2 +1,3 @@
|
|||
.vscode
|
||||
.env.priv
|
||||
.env.priv
|
||||
.venv
|
|
@ -1,14 +1,38 @@
|
|||
steps:
|
||||
lint:
|
||||
image: debian:stable-slim
|
||||
check_ports_labels:
|
||||
image: python:3.13-slim
|
||||
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 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
|
||||
- chmod +x //usr/local/bin/docker-compose
|
||||
- sh .ci/lint.sh
|
||||
when:
|
||||
- event: pull_request
|
||||
repo: gnouseu/docker-services
|
||||
- event: push
|
||||
branch: main
|
||||
- chmod +x /usr/local/bin/docker-compose
|
||||
- bash .ci/lint_wrap.sh
|
||||
comment_2:
|
||||
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]
|
||||
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
|
||||
|
||||
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:
|
||||
server:
|
||||
image: codeberg.org/forgejo/forgejo:9.0.3
|
||||
image: codeberg.org/forgejo/forgejo:10.0.1
|
||||
restart: always
|
||||
container_name: forgejo
|
||||
env_file:
|
||||
|
|
|
@ -4,7 +4,7 @@ networks:
|
|||
|
||||
services:
|
||||
renovate:
|
||||
image: ghcr.io/renovatebot/renovate:39.86.2-full
|
||||
image: ghcr.io/renovatebot/renovate:39.170.2-full
|
||||
restart: always
|
||||
environment:
|
||||
- LOG_LEVEL=info
|
||||
|
|
|
@ -8,7 +8,7 @@ volumes:
|
|||
|
||||
services:
|
||||
server:
|
||||
image: "searxng/searxng:2024.10.4-3e747d049"
|
||||
image: "searxng/searxng:2025.1.6-6dab7fe78"
|
||||
depends_on:
|
||||
- "redis"
|
||||
environment:
|
||||
|
|
|
@ -8,7 +8,7 @@ volumes:
|
|||
|
||||
services:
|
||||
wallabag:
|
||||
image: wallabag/wallabag
|
||||
image: wallabag/wallabag:2.6.10
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
- SYMFONY__ENV__DATABASE_DRIVER=pdo_pgsql
|
||||
|
|
|
@ -7,7 +7,7 @@ services:
|
|||
image: git.gnous.eu/gnouseu/wiki:v3
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- "3005:80"
|
||||
- "3010:80"
|
||||
labels:
|
||||
- "traefik.enable=true"
|
||||
- "traefik.http.routers.wiki.entryPoints=websecure"
|
||||
|
|
|
@ -12,7 +12,7 @@ volumes:
|
|||
|
||||
services:
|
||||
gitlab:
|
||||
image: gitlab/gitlab-ce:17.7.0-ce.0
|
||||
image: gitlab/gitlab-ce:17.9.0-ce.0
|
||||
container_name: gitlab
|
||||
restart: always
|
||||
hostname: "gitlab.gnous.eu"
|
||||
|
|
|
@ -13,7 +13,7 @@ services:
|
|||
- mastodon
|
||||
|
||||
web:
|
||||
image: ghcr.io/mastodon/mastodon:v4.3.2
|
||||
image: ghcr.io/mastodon/mastodon:v4.3.3
|
||||
restart: always
|
||||
env_file:
|
||||
- path: .env.production
|
||||
|
@ -44,7 +44,7 @@ services:
|
|||
- "ofelia.job-exec.clean-account.command=tootctl accounts cull"
|
||||
|
||||
streaming:
|
||||
image: ghcr.io/mastodon/mastodon-streaming:v4.3.2
|
||||
image: ghcr.io/mastodon/mastodon-streaming:v4.3.3
|
||||
restart: always
|
||||
env_file:
|
||||
- path: .env.production
|
||||
|
@ -70,7 +70,7 @@ services:
|
|||
- "traefik.http.routers.mastodon-streaming.middlewares=proxyHeader@file,proxyError@file"
|
||||
|
||||
sidekiq:
|
||||
image: ghcr.io/mastodon/mastodon:v4.3.2
|
||||
image: ghcr.io/mastodon/mastodon:v4.3.3
|
||||
restart: always
|
||||
env_file:
|
||||
- path: .env.production
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
services:
|
||||
ofelia:
|
||||
image: mcuadros/ofelia:0.3.14
|
||||
image: mcuadros/ofelia:v3.0.8
|
||||
command: daemon --docker
|
||||
volumes:
|
||||
- /var/run/docker.sock:/var/run/docker.sock:ro
|
||||
|
|
|
@ -8,7 +8,7 @@ volumes:
|
|||
|
||||
services:
|
||||
vaultwarden:
|
||||
image: vaultwarden/server:1.32.7
|
||||
image: vaultwarden/server:1.33.2
|
||||
container_name: vaultwarden
|
||||
environment:
|
||||
- WEBSOCKET_ENABLED=true # Enable WebSocket notifications.
|
||||
|
|
|
@ -9,7 +9,7 @@ volumes:
|
|||
|
||||
services:
|
||||
server:
|
||||
image: woodpeckerci/woodpecker-server:v2.8.2
|
||||
image: woodpeckerci/woodpecker-server:v3.1.0
|
||||
container_name: woodpecker_server
|
||||
environment:
|
||||
- WOODPECKER_OPEN=true
|
||||
|
|
|
@ -14,7 +14,7 @@ services:
|
|||
restart: unless-stopped
|
||||
ports:
|
||||
- 8085:3000
|
||||
image: semaphoreui/semaphore:v2.11.2
|
||||
image: semaphoreui/semaphore:v2.12.14
|
||||
env_file:
|
||||
- .env
|
||||
environment:
|
||||
|
|
|
@ -10,7 +10,7 @@ services:
|
|||
- db-data:/var/lib/postgresql/data
|
||||
|
||||
server:
|
||||
image: ghcr.io/requarks/wiki:2.5.305
|
||||
image: ghcr.io/requarks/wiki:2.5.306
|
||||
depends_on:
|
||||
- db
|
||||
environment:
|
||||
|
|
|
@ -4,7 +4,7 @@ volumes:
|
|||
|
||||
services:
|
||||
agent:
|
||||
image: woodpeckerci/woodpecker-agent:latest
|
||||
image: woodpeckerci/woodpecker-agent:next
|
||||
container_name: woodpecker_agent
|
||||
environment:
|
||||
- WOODPECKER_SERVER=grpc.build.net.enpls.org:443
|
||||
|
|
|
@ -10,7 +10,7 @@ volumes:
|
|||
|
||||
services:
|
||||
server:
|
||||
image: woodpeckerci/woodpecker-server:v2.8.2
|
||||
image: woodpeckerci/woodpecker-server:v3.1.0
|
||||
container_name: woodpecker_server
|
||||
environment:
|
||||
- WOODPECKER_OPEN=false
|
||||
|
@ -53,7 +53,7 @@ services:
|
|||
- "traefik.http.routers.woodpecker-grpc-secure.entrypoints=websecure"
|
||||
- "traefik.http.routers.woodpecker-grpc-secure.service=woodpecker-grpc"
|
||||
- "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:
|
||||
- db
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue