From b0d36f66465dc7bf76099655b504cebeac82f97d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?S=C3=A9bastien=20DA=20ROCHA?= <sdarocha@neogeo.fr>
Date: Wed, 13 Jul 2022 14:59:02 +0000
Subject: [PATCH] initial import

---
 .gitlab-ci.yml          | 31 +++++++++++++++++++++++++++++++
 20_consumer_timout.conf |  2 ++
 Dockerfile              |  3 +++
 docker-compose.yml      |  9 +++++++++
 4 files changed, 45 insertions(+)
 create mode 100644 20_consumer_timout.conf
 create mode 100644 Dockerfile
 create mode 100644 docker-compose.yml

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index fef13ef..0785dd0 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -7,7 +7,38 @@
 # See https://docs.gitlab.com/ee/ci/variables/#cicd-variable-precedence
 stages:
 - test
+- build
 sast:
   stage: test
 include:
 - template: Security/SAST.gitlab-ci.yml
+
+
+stages:
+  - build
+
+build_development:
+  stage: build
+  tags:
+    - build
+  only:
+    - development
+  variables:
+    TAG: testing
+  script:
+    - docker-compose build
+    - docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
+    - docker-compose push
+
+build_release:
+  stage: build
+  tags:
+    - build
+  only:
+    - tags
+  variables:
+    TAG: 3-management
+  script:
+    - docker-compose build
+    - docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
+    - docker-compose push
diff --git a/20_consumer_timout.conf b/20_consumer_timout.conf
new file mode 100644
index 0000000..870b205
--- /dev/null
+++ b/20_consumer_timout.conf
@@ -0,0 +1,2 @@
+# ten hours in milliseconds
+consumer_timeout = 36000000
diff --git a/Dockerfile b/Dockerfile
new file mode 100644
index 0000000..c3c3059
--- /dev/null
+++ b/Dockerfile
@@ -0,0 +1,3 @@
+FROM rabbitmq:3-management
+
+COPY 20_consumer_timout.conf /etc/rabbitmq/conf.d/
diff --git a/docker-compose.yml b/docker-compose.yml
new file mode 100644
index 0000000..2ee7eb3
--- /dev/null
+++ b/docker-compose.yml
@@ -0,0 +1,9 @@
+
+version: "3.0"
+services:
+  rabbitmq:
+    image: registry.forge.grandlyon.com/web-et-numerique/web-et-numerique-internet/data.grandlyon.com/web-portal/components/indexers/rabbitmq:${TAG}
+    ports:
+      - 15672:15672
+      - 5672:5672
+    restart: unless-stopped
-- 
GitLab