From 3c1eb707cbd74df4519d185cba8307db6d472083 Mon Sep 17 00:00:00 2001 From: Edouard DUPIN Date: Fri, 30 Dec 2022 09:14:05 +0100 Subject: [PATCH] [DEBUG] remove some bad things for prod --- Dockerfile | 41 ++++++++----------- back/Dockerfile | 2 +- .../org/kar/karanage/util/ConfigVariable.java | 2 +- docker-compose.yaml | 18 ++++---- 4 files changed, 27 insertions(+), 36 deletions(-) diff --git a/Dockerfile b/Dockerfile index 5f3781a..fb9d032 100644 --- a/Dockerfile +++ b/Dockerfile @@ -27,26 +27,26 @@ RUN mvn clean compile assembly:single ## Build front: ## ###################################################################################### -FROM builder AS buildFront +#FROM builder AS buildFront -ADD front/package-lock.json \ - front/package.json \ - front/karma.conf.js \ - front/protractor.conf.js \ - /tmp/ +#ADD front/package-lock.json \ +# front/package.json \ +# front/karma.conf.js \ +# front/protractor.conf.js \ +# /tmp/ # install and cache app dependencies -RUN npm install +#RUN npm install -ADD front/e2e \ - front/tsconfig.json \ - front/tslint.json \ - front/angular.json \ - /tmp/ -ADD front/src /tmp/src +#ADD front/e2e \ +# front/tsconfig.json \ +# front/tslint.json \ +# front/angular.json \ +# /tmp/ +#ADD front/src /tmp/src # generate build -RUN ng build --output-path=dist --configuration=production --base-href=/karusic/ --deploy-url=/karusic/ +#RUN ng build --output-path=dist --configuration=production --base-href=/karanage/ --deploy-url=/karanage/ ###################################################################################### ## @@ -58,22 +58,13 @@ FROM bellsoft/liberica-openjdk-alpine:latest # add wget to manage the health check... RUN apk add --no-cache wget -#FROM archlinux:base -#RUN pacman -Syu --noconfirm && pacman-db-upgrade -## install package -#RUN pacman -S --noconfirm jdk-openjdk wget -## intall npm -#RUN pacman -S --noconfirm npm -## clean all the caches Need only on the release environment -#RUN pacman -Scc --noconfirm - ENV LANG=C.UTF-8 COPY --from=buildBack /tmp/out/maven/*.jar /application/application.jar -COPY --from=buildFront /tmp/dist /application/front/ +#COPY --from=buildFront /tmp/dist /application/front/ WORKDIR /application/ EXPOSE 80 -CMD ["java", "-Xms64M", "-Xmx1G", "-cp", "/application/application.jar", "org.kar.karusic.WebLauncher"] +CMD ["java", "-Xms64M", "-Xmx1G", "-cp", "/application/application.jar", "org.kar.karanage.WebLauncher"] diff --git a/back/Dockerfile b/back/Dockerfile index 8fc1c69..927c7b4 100644 --- a/back/Dockerfile +++ b/back/Dockerfile @@ -17,5 +17,5 @@ WORKDIR /application/ EXPOSE 18080 -CMD ["java", "-Xms64M", "-Xmx1G", "-cp", "/application/application.jar", "org.kar.karusic.WebLauncher"] +CMD ["java", "-Xms64M", "-Xmx1G", "-cp", "/application/application.jar", "org.kar.karanage.WebLauncher"] diff --git a/back/src/org/kar/karanage/util/ConfigVariable.java b/back/src/org/kar/karanage/util/ConfigVariable.java index fd2ea5e..87513fd 100644 --- a/back/src/org/kar/karanage/util/ConfigVariable.java +++ b/back/src/org/kar/karanage/util/ConfigVariable.java @@ -1,7 +1,7 @@ package org.kar.karanage.util; public class ConfigVariable { - public static final String BASE_NAME = "ORG_KARUSIC_"; + public static final String BASE_NAME = "ORG_KARANAGE_"; public static String getFrontFolder() { diff --git a/docker-compose.yaml b/docker-compose.yaml index d82f84d..7aad90c 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -1,14 +1,14 @@ version: '3' services: - karusic_db_service: + karanage_db_service: image: mysql:latest restart: always command: --default-authentication-plugin=mysql_native_password env_file: - ./config.env volumes: - - /workspace/data/karusic/db:/var/lib/mysql + - /workspace/data/karanage/db:/var/lib/mysql mem_limit: 600m healthcheck: test: ["CMD", "mysqladmin" ,"ping", "-h", "localhost"] @@ -19,28 +19,28 @@ services: image: adminer:latest restart: always depends_on: - - karusic_db_service + - karanage_db_service ports: - 19079:8080 links: - - karusic_db_service:db + - karanage_db_service:db read_only: false mem_limit: 100m - karusic_back_service: + karanage_back_service: restart: always - image: gitea.atria-soft.org/kangaroo-and-rabbit/karusic:latest + image: gitea.atria-soft.org/kangaroo-and-rabbit/karanage:latest depends_on: - - karusic_db_service + - karanage_db_service ports: - 19080:18080 env_file: - ./config.env links: - - karusic_db_service:db + - karanage_db_service:db read_only: true mem_limit: 1200m healthcheck: - test: ["CMD", "wget" ,"http://localhost:18080/karusic/api/health_check", "-O", "/dev/null"] + test: ["CMD", "wget" ,"http://localhost:18080/karanage/api/health_check", "-O", "/dev/null"] timeout: 20s retries: 3