Compare commits

..

1 commit

Author SHA1 Message Date
c8e3c49ed7 Update postgres Docker tag to v17 2025-01-04 13:14:26 +00:00
23 changed files with 37 additions and 108 deletions

View file

@ -1,28 +0,0 @@
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 Executable file → Normal file
View file

View file

@ -1,11 +0,0 @@
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

View file

@ -52,20 +52,25 @@ 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🔗 Exposed ports: {exposedPorts}")
f"\n🔴 No exposed ports found"
f"\n")
else:
print(f"\n📦 {dockerComposeFile}"
f"\n🔗 Exposed ports: {exposedPorts}"
f"\n")
wrong = checkPortUnique(ports)
if wrong:
exit(1)
else:
print("\n✅ All ports are unique")
print("\n\n✅ All ports are unique\n\n")
exit(0)
if __name__ == "__main__":
print("Port Attribution Watcher")
print("Traefik label watcher CI/CD")
# Read folder from env
watchFolder = os.getenv("WATCH_FOLDER")
if watchFolder == None:

View file

@ -1 +0,0 @@
pyyaml==6.0.2

View file

@ -85,7 +85,7 @@ def main(watchFolder: str):
if wrong:
exit(1)
else:
print("\n\n✅ All routers are unique")
print("\n\n✅ All routers are unique\n\n")
exit(0)
if __name__ == "__main__":

3
.gitignore vendored
View file

@ -1,3 +1,2 @@
.vscode
.env.priv
.venv
.env.priv

View file

@ -1,38 +1,14 @@
steps:
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
image: debian:stable-slim
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
- 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"]'
- chmod +x //usr/local/bin/docker-compose
- sh .ci/lint.sh
when:
- event: pull_request
repo: gnouseu/docker-services
- event: push
branch: main

View file

@ -1,14 +1,3 @@
# Services 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
```
L'ensemble des docker compose pour les services du projet Gnous.

View file

@ -9,7 +9,7 @@ volumes:
services:
server:
image: codeberg.org/forgejo/forgejo:10.0.1
image: codeberg.org/forgejo/forgejo:9.0.3
restart: always
container_name: forgejo
env_file:

View file

@ -4,7 +4,7 @@ networks:
services:
renovate:
image: ghcr.io/renovatebot/renovate:39.170.2-full
image: ghcr.io/renovatebot/renovate:39.86.2-full
restart: always
environment:
- LOG_LEVEL=info

View file

@ -8,7 +8,7 @@ volumes:
services:
server:
image: "searxng/searxng:2025.1.6-6dab7fe78"
image: "searxng/searxng:2024.10.4-3e747d049"
depends_on:
- "redis"
environment:

View file

@ -8,7 +8,7 @@ volumes:
services:
wallabag:
image: wallabag/wallabag:2.6.10
image: wallabag/wallabag
restart: unless-stopped
environment:
- SYMFONY__ENV__DATABASE_DRIVER=pdo_pgsql

View file

@ -7,7 +7,7 @@ services:
image: git.gnous.eu/gnouseu/wiki:v3
restart: unless-stopped
ports:
- "3010:80"
- "3005:80"
labels:
- "traefik.enable=true"
- "traefik.http.routers.wiki.entryPoints=websecure"

View file

@ -12,7 +12,7 @@ volumes:
services:
gitlab:
image: gitlab/gitlab-ce:17.9.0-ce.0
image: gitlab/gitlab-ce:17.7.0-ce.0
container_name: gitlab
restart: always
hostname: "gitlab.gnous.eu"

View file

@ -13,7 +13,7 @@ services:
- mastodon
web:
image: ghcr.io/mastodon/mastodon:v4.3.3
image: ghcr.io/mastodon/mastodon:v4.3.2
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.3
image: ghcr.io/mastodon/mastodon-streaming:v4.3.2
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.3
image: ghcr.io/mastodon/mastodon:v4.3.2
restart: always
env_file:
- path: .env.production

View file

@ -1,6 +1,6 @@
services:
ofelia:
image: mcuadros/ofelia:v3.0.8
image: mcuadros/ofelia:0.3.14
command: daemon --docker
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro

View file

@ -8,7 +8,7 @@ volumes:
services:
vaultwarden:
image: vaultwarden/server:1.33.2
image: vaultwarden/server:1.32.7
container_name: vaultwarden
environment:
- WEBSOCKET_ENABLED=true # Enable WebSocket notifications.

View file

@ -9,7 +9,7 @@ volumes:
services:
server:
image: woodpeckerci/woodpecker-server:v3.1.0
image: woodpeckerci/woodpecker-server:v2.8.2
container_name: woodpecker_server
environment:
- WOODPECKER_OPEN=true

View file

@ -14,7 +14,7 @@ services:
restart: unless-stopped
ports:
- 8085:3000
image: semaphoreui/semaphore:v2.12.14
image: semaphoreui/semaphore:v2.11.2
env_file:
- .env
environment:

View file

@ -10,7 +10,7 @@ services:
- db-data:/var/lib/postgresql/data
server:
image: ghcr.io/requarks/wiki:2.5.306
image: ghcr.io/requarks/wiki:2.5.305
depends_on:
- db
environment:

View file

@ -4,7 +4,7 @@ volumes:
services:
agent:
image: woodpeckerci/woodpecker-agent:next
image: woodpeckerci/woodpecker-agent:latest
container_name: woodpecker_agent
environment:
- WOODPECKER_SERVER=grpc.build.net.enpls.org:443

View file

@ -10,7 +10,7 @@ volumes:
services:
server:
image: woodpeckerci/woodpecker-server:v3.1.0
image: woodpeckerci/woodpecker-server:v2.8.2
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.woodpecker-grpc.middlewares=proxyHeader@file,proxyError@file"
- "traefik.http.routers.gnousdoteu.middlewares=proxyHeader@file,proxyError@file"
depends_on:
- db