From 84ee6867b8c95ff80e4909977e78725429a10cf4 Mon Sep 17 00:00:00 2001
From: David Beniamine <david.beniamine@tetras-libre.fr>
Date: Fri, 8 May 2020 19:14:02 +0200
Subject: [PATCH] Set default branch to master

Also use GIT_REF instead of GIT_VERSION
---
 .env.sample        | 2 +-
 Dockerfile         | 9 +++++----
 docker-compose.yml | 2 +-
 3 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/.env.sample b/.env.sample
index 74416ea..e31c215 100644
--- a/.env.sample
+++ b/.env.sample
@@ -1,4 +1,4 @@
 RESTART=no
 APP_DEBUG=false
 DEV_PORT=5000
-GIT_VERSION=1-project-creation
+GIT_REF=master
diff --git a/Dockerfile b/Dockerfile
index 81c1214..fe04261 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -7,7 +7,6 @@ RUN apt-get update
 FROM base As builder
 
 RUN apt-get install -y \
-    apache2 \
     git \
     maven \
     openjdk-11-jdk
@@ -18,9 +17,10 @@ RUN git clone https://gitlab.tetras-libre.fr/unl/unl2rdf
 
 WORKDIR /opt/unl2rdf
 
-ARG GIT_VERSION=master
+ARG GIT_REF=master
 
-RUN git checkout $GIT_VERSION
+RUN git pull
+RUN git checkout $GIT_REF
 
 RUN mvn package
 
@@ -43,7 +43,8 @@ RUN a2dissite 000-default
 
 RUN a2ensite flask
 
-COPY --from=builder /opt/unl2rdf/target/*.jar /opt/unl2rdf.jar
+COPY --from=builder /opt/unl2rdf/unl2rdf-app/target/unl2rdf-app-*-with-dependencies.jar /opt/unl2rdf.jar
+#COPY --from=builder /opt/unl2rdf/Examples/exemples_unl.txt /opt/
 
 # Force code reloading
 RUN sed -i 's/^\(\s*MaxConnectionsPerChild\s*\) 0/\1 1/g' /etc/apache2/mods-enabled/mpm_event.conf
diff --git a/docker-compose.yml b/docker-compose.yml
index b07ef8b..6fc2d36 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -6,7 +6,7 @@ services:
         build:
           context: .
           args:
-            GIT_VERSION: ${GIT_VERSION}
+            GIT_REF: ${GIT_REF}
         volumes:
           - "./src:/var/www/app"
         environment:
-- 
GitLab