From 85350cfe865139a8ff2ab62443f677115b12eb6a Mon Sep 17 00:00:00 2001 From: Gato Date: Sun, 7 Jun 2026 08:03:28 +0200 Subject: [PATCH] feat: ajout du service olhar-api MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Docker Compose calqué sur bonsai-api : PostgreSQL 16 + Spring Boot exposé sur olhar.goutailler-olivier.com/api via Traefik, avec Watchtower activé. Co-Authored-By: Claude Sonnet 4.6 --- olhar-api/docker-compose.yml | 54 ++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 olhar-api/docker-compose.yml diff --git a/olhar-api/docker-compose.yml b/olhar-api/docker-compose.yml new file mode 100644 index 0000000..08eef74 --- /dev/null +++ b/olhar-api/docker-compose.yml @@ -0,0 +1,54 @@ +name: olhar-api-stack + +services: + db: + image: postgres:16-alpine + container_name: olhar-api-db + restart: unless-stopped + environment: + POSTGRES_DB: olhar + POSTGRES_USER: olhar + POSTGRES_PASSWORD: ${POSTGRES_PASSWORD} + TZ: Europe/Paris + healthcheck: + test: ["CMD-SHELL", "pg_isready -U olhar -d olhar"] + interval: 10s + timeout: 5s + retries: 5 + volumes: + - ~/Applications/data/olhar-api/db_data:/var/lib/postgresql/data + networks: + - olhar-api-net + + api: + image: git.goutailler-olivier.com/gato/olhar-api:latest + container_name: olhar-api + restart: unless-stopped + depends_on: + db: + condition: service_healthy + environment: + DATASOURCE_URL: jdbc:postgresql://db:5432/olhar + DATASOURCE_USERNAME: olhar + DATASOURCE_PASSWORD: ${POSTGRES_PASSWORD} + KEYCLOAK_JWKS_URI: https://auth.goutailler-olivier.com/realms/olhar/protocol/openid-connect/certs + CORS_ALLOWED_ORIGIN_PROD: https://olhar.goutailler-olivier.com + TZ: Europe/Paris + networks: + - olhar-api-net + - proxy + labels: + - traefik.enable=true + - traefik.http.routers.olhar-api.rule=Host(`olhar.goutailler-olivier.com`) && PathPrefix(`/api`) + - traefik.http.routers.olhar-api.entrypoints=websecure + - traefik.http.routers.olhar-api.tls.certresolver=le + - traefik.http.services.olhar-api.loadbalancer.server.port=8080 + - traefik.docker.network=proxy + - com.centurylinklabs.watchtower.enable=true + +networks: + olhar-api-net: + driver: bridge + proxy: + external: true + name: proxy