diff --git a/Controle-A-Distance/Guacamole/docker-compose-traefik.yml b/Controle-A-Distance/Guacamole/docker-compose-traefik.yml index eb904b1a..2a75c735 100644 --- a/Controle-A-Distance/Guacamole/docker-compose-traefik.yml +++ b/Controle-A-Distance/Guacamole/docker-compose-traefik.yml @@ -34,6 +34,11 @@ services: image: postgres:15.6-alpine networks: - back_network + healthcheck: + test: ["CMD-SHELL", "pg_isready -d $${POSTGRES_DB} -U $${POSTGRES_USER}"] + interval: 30s + timeout: 10s + retries: 10 restart: always volumes: - ./init:/docker-entrypoint-initdb.d:ro diff --git a/Ordonnanceur/kestra/README.md b/Ordonnanceur/kestra/README.md new file mode 100644 index 00000000..7deae07a --- /dev/null +++ b/Ordonnanceur/kestra/README.md @@ -0,0 +1,5 @@ +# Kestra avec docker-compose + + +## Buy me a coffe +Buy Me a Coffee at ko-fi.com diff --git a/Ordonnanceur/kestra/docker-compose-traefik.yml b/Ordonnanceur/kestra/docker-compose-traefik.yml new file mode 100644 index 00000000..69e72dd7 --- /dev/null +++ b/Ordonnanceur/kestra/docker-compose-traefik.yml @@ -0,0 +1,93 @@ +#### NETWORKS +networks: + docker-traefik_front_network: + external: true + back_network: + driver: bridge + attachable: true + +#### SERVICES +services: +# postgres + postgres: + container_name: kestra-postgres + hostname: kestra-postgres + environment: + PGDATA: /var/lib/postgresql/data/kestra + POSTGRES_DB: kestra_db + POSTGRES_PASSWORD: 'P@ssword!Here!123456' + POSTGRES_USER: kestra_user + TZ: Europe/Paris + image: postgres:15.6-alpine + networks: + - back_network + volumes: + - ./data:/var/lib/postgresql/data:rw + healthcheck: + test: ["CMD-SHELL", "pg_isready -d $${POSTGRES_DB} -U $${POSTGRES_USER}"] + interval: 30s + timeout: 10s + retries: 10 + restart: always +# kestra + kestra: + container_name: kestra-app + hostname: kestra-app + environment: + KESTRA_CONFIGURATION: | + datasources: + postgres: + url: jdbc:postgresql://postgres:5432/kestra_db + driverClassName: org.postgresql.Driver + username: kestra_user + password: P@ssword!Here!123456 + kestra: + server: + basic-auth: + enabled: false + username: "admin@kestra.io" # it must be a valid email address + password: kestra + repository: + type: postgres + storage: + type: local + local: + base-path: "/app/storage" + queue: + type: postgres + tasks: + tmp-dir: + path: /tmp/kestra-wd/tmp + url: http://localhost:8080/ + image: kestra/kestra:latest-full + pull_policy: always + # Note that this setup with a root user is intended for development purpose. For production deployments, you might prefer a version without a root user. + # Our base image runs without root, but the Docker Compose implementation needs root to access the Docker socket + # This version is rootless but more complex https://github.com/kestra-io/kestra/blob/develop/docker-compose-dind.yml + user: "root" + command: server standalone --worker-thread=128 + volumes: + - ./kestra-data:/app/storage:rw + - /var/run/docker.sock:/var/run/docker.sock + - ./kestra-wd:/tmp/kestra-wd:rw + depends_on: + postgres: + condition: service_started + networks: + - back_network + - docker-traefik_front_network + restart: always + labels: + - "traefik.enable=true" + - "traefik.docker.network=docker-traefik_front_network" +# HTTP + - "traefik.http.routers.kestra-http.rule=Host(`kestra.tips-of-mine.local`)" + - "traefik.http.routers.kestra-http.entrypoints=http" +# HTTPS + - "traefik.http.routers.kestra-https.rule=Host(`kestra.tips-of-mine.local`)" + - "traefik.http.routers.kestra-https.entrypoints=https" + - "traefik.http.routers.kestra-https.tls=true" + - "traefik.http.routers.kestra.service=kestra-service" +# Middleware +# Service + - "traefik.http.services.kestra-service.loadbalancer.server.port=8081" \ No newline at end of file diff --git a/Ordonnanceur/kestra/docker-compose.yml b/Ordonnanceur/kestra/docker-compose.yml new file mode 100644 index 00000000..70a69fd2 --- /dev/null +++ b/Ordonnanceur/kestra/docker-compose.yml @@ -0,0 +1,70 @@ +#### SERVICES +services: +# postgres + postgres: + container_name: kestra-postgres + hostname: kestra-postgres + environment: + PGDATA: /var/lib/postgresql/data/kestra + POSTGRES_DB: kestra_db + POSTGRES_PASSWORD: 'P@ssword!Here!123456' + POSTGRES_USER: kestra_user + TZ: Europe/Paris + image: postgres:15.6-alpine + volumes: + - ./data:/var/lib/postgresql/data:rw + healthcheck: + test: ["CMD-SHELL", "pg_isready -d $${POSTGRES_DB} -U $${POSTGRES_USER}"] + interval: 30s + timeout: 10s + retries: 10 + restart: always + +# kestra + kestra: + container_name: kestra-app + hostname: kestra-app + environment: + KESTRA_CONFIGURATION: | + datasources: + postgres: + url: jdbc:postgresql://postgres:5432/kestra_db + driverClassName: org.postgresql.Driver + username: kestra_user + password: P@ssword!Here!123456 + kestra: + server: + basic-auth: + enabled: false + username: "admin@kestra.io" # it must be a valid email address + password: kestra + repository: + type: postgres + storage: + type: local + local: + base-path: "/app/storage" + queue: + type: postgres + tasks: + tmp-dir: + path: /tmp/kestra-wd/tmp + url: http://localhost:8080/ + image: kestra/kestra:latest-full + pull_policy: always + # Note that this setup with a root user is intended for development purpose. For production deployments, you might prefer a version without a root user. + # Our base image runs without root, but the Docker Compose implementation needs root to access the Docker socket + # This version is rootless but more complex https://github.com/kestra-io/kestra/blob/develop/docker-compose-dind.yml + user: "root" + command: server standalone --worker-thread=128 + volumes: + - ./kestra-data:/app/storage:rw + - /var/run/docker.sock:/var/run/docker.sock + - ./kestra-wd:/tmp/kestra-wd:rw + ports: + - "8088:8080" + - "8089:8081" + depends_on: + postgres: + condition: service_started + restart: always