diff --git a/.env.sample b/.env.sample index 74416ea0ac4728db28928a9c27ea32ca8b2689ba..e31c2152d07b33c7fd8c8a6c9fa3da3e64bcf308 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 81c121432c8aee4742bd409e83c96fa3b65deec9..fe04261c3d56cc536c519ac675489272dc8941bf 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 b07ef8bdc28f8ff26cb071fd19c9527c643ce0b3..6fc2d366922ea08c3ef620068663df17959331d8 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: