This is an automated email from the git hooks/post-receive script. New commit to branch bow-v2-go in repository bow. See https://gitlab.nuiton.org/chorem/bow.git commit dd337a28b202b0ca0890cf8c7ca47e0803b470d0 Author: Benjamin <poussin@codelutin.com> Date: Mon Dec 28 13:06:00 2020 +0100 ajout de postgres-exporter --- docker/docker-compose.yml | 100 +++++++++++++++++++++++++++++++++------------- 1 file changed, 72 insertions(+), 28 deletions(-) diff --git a/docker/docker-compose.yml b/docker/docker-compose.yml index c949cdd..26d5e96 100644 --- a/docker/docker-compose.yml +++ b/docker/docker-compose.yml @@ -15,6 +15,42 @@ volumes: type: 'high-speed' services: + bow: + image: registry.nuiton.org/chorem/bow:$CI_COMMIT_REF_SLUG + networks: + - traefik-net + - caddy + - default + environment: + DATABASE_URL: 'postgres://dbuser:xxxxxxxx@database:5432/bow' + SECRET_KEY: $BOW_SECRET_KEY + BOW_PUBLIC_URL: https://bookmarks.cl + logging: + driver: 'json-file' + options: + max-file: 5 + max-size: 10m + deploy: + placement: + constraints: + - node.labels.function == saas + resources: + # limits: + # cpus: '0.60' + # memory: 200M + reservations: + cpus: '0.02' + memory: 13M + labels: + - caddy=bookmarks.cl + - caddy.reverse_proxy="{{upstreams 8000}}" + # healthcheck: + # test: bow --healthcheck # À implémenter + # interval: 1m30s + # timeout: 10s + # retries: 3 + # start_period: 3m + database: image: postgres:12.0-alpine environment: @@ -46,16 +82,10 @@ services: retries: 3 start_period: 3m - bow: - image: registry.nuiton.org/chorem/bow:$CI_COMMIT_REF_SLUG - networks: - - traefik-net - - caddy - - default + postgres-exporter: + image: wrouesnel/postgres_exporter environment: - DATABASE_URL: 'postgres://dbuser:xxxxxxxx@database:5432/bow' - SECRET_KEY: $BOW_SECRET_KEY - BOW_PUBLIC_URL: https://bookmarks.cl + DATA_SOURCE_NAME: "postgres://dbuser:xxxxxxxx@database:5432/bow?sslmode=disable" logging: driver: 'json-file' options: @@ -64,26 +94,40 @@ services: deploy: placement: constraints: - - node.labels.function == saas + - node.labels.function==saas resources: - # limits: - # cpus: '0.60' - # memory: 200M + # limits: + # cpus: '0.60' + # memory: 200M reservations: - cpus: '0.02' - memory: 13M + cpus: '0.01' + memory: 10M labels: - - traefik.enable=true - - traefik.http.routers.bow.rule=Host(`bookmarks.cl`) - - traefik.http.services.bow.loadbalancer.server.port=8000 - - traefik.http.routers.bow.entrypoints=https - - traefik.http.routers.bow.tls=true - - traefik.http.routers.bow.tls.certresolver=codelutin - - caddy=bookmarks.cl + - prometheus=true + - caddy=postgres-exporter.admin.bookmarks.cl - caddy.reverse_proxy="{{upstreams 8000}}" - # healthcheck: - # test: bow --healthcheck # À implémenter - # interval: 1m30s - # timeout: 10s - # retries: 3 - # start_period: 3m + +# pgadmin: +# image: registry.nuiton.org/codelutin/admsys/swarm-stack/pgadmin:latest +# networks: +# - caddy +# - default +# env_file: +# - db.env +# logging: +# driver: "json-file" +# options: +# max-file: 5 +# max-size: 10m +# deploy: +# placement: +# constraints: +# - node.labels.function==infracl +# labels: +# caddy: db.admin.bookmarks.cl +# caddy.import: prod_config +# caddy.reverse_proxy: "@cl_ip {{upstreams 80}}" +# resources: +# reservations: +# cpus: "0.01" +# memory: 115M -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.