From 77e11ddc46b607aa0bf7f97efbb1794bd5bf7ede Mon Sep 17 00:00:00 2001
From: ddamiron <ddamiron@sii.fr>
Date: Tue, 11 Jun 2019 15:44:03 +0200
Subject: [PATCH] add gitlab-ci add docker logger driver

---
 .gitlab-ci.yml     | 19 +++++++++++++++++++
 docker-compose.yml |  5 +++++
 2 files changed, 24 insertions(+)
 create mode 100644 .gitlab-ci.yml

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
new file mode 100644
index 0000000..9399935
--- /dev/null
+++ b/.gitlab-ci.yml
@@ -0,0 +1,19 @@
+stages:
+  - build
+  - deploy
+
+build:
+  stage: build
+  tags:
+    - build
+  only:
+    - master
+  script:
+    - docker-compose build
+
+deploy:
+  stage: deploy
+  only:
+    - master
+  script:
+    - docker-compose --project-name portail-data-documentation up -d --force-recreate
diff --git a/docker-compose.yml b/docker-compose.yml
index 616e1f1..77469de 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -6,4 +6,9 @@ services:
       context: ./
     ports:
       - 2077:8000
+    logging:
+      driver: "json-file"
+      options:
+        max-size: "2m"
+        max-file: "5"
     restart: on-failure
\ No newline at end of file
-- 
GitLab