[DEBUG] remove some bad things for prod

This commit is contained in:
Edouard DUPIN 2022-12-30 09:14:05 +01:00
parent 9739d0f2d1
commit 3c1eb707cb
4 changed files with 27 additions and 36 deletions

View File

@ -27,26 +27,26 @@ RUN mvn clean compile assembly:single
## Build front: ## Build front:
## ##
###################################################################################### ######################################################################################
FROM builder AS buildFront #FROM builder AS buildFront
ADD front/package-lock.json \ #ADD front/package-lock.json \
front/package.json \ # front/package.json \
front/karma.conf.js \ # front/karma.conf.js \
front/protractor.conf.js \ # front/protractor.conf.js \
/tmp/ # /tmp/
# install and cache app dependencies # install and cache app dependencies
RUN npm install #RUN npm install
ADD front/e2e \ #ADD front/e2e \
front/tsconfig.json \ # front/tsconfig.json \
front/tslint.json \ # front/tslint.json \
front/angular.json \ # front/angular.json \
/tmp/ # /tmp/
ADD front/src /tmp/src #ADD front/src /tmp/src
# generate build # 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... # add wget to manage the health check...
RUN apk add --no-cache wget 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 ENV LANG=C.UTF-8
COPY --from=buildBack /tmp/out/maven/*.jar /application/application.jar 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/ WORKDIR /application/
EXPOSE 80 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"]

View File

@ -17,5 +17,5 @@ WORKDIR /application/
EXPOSE 18080 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"]

View File

@ -1,7 +1,7 @@
package org.kar.karanage.util; package org.kar.karanage.util;
public class ConfigVariable { public class ConfigVariable {
public static final String BASE_NAME = "ORG_KARUSIC_"; public static final String BASE_NAME = "ORG_KARANAGE_";
public static String getFrontFolder() { public static String getFrontFolder() {

View File

@ -1,14 +1,14 @@
version: '3' version: '3'
services: services:
karusic_db_service: karanage_db_service:
image: mysql:latest image: mysql:latest
restart: always restart: always
command: --default-authentication-plugin=mysql_native_password command: --default-authentication-plugin=mysql_native_password
env_file: env_file:
- ./config.env - ./config.env
volumes: volumes:
- /workspace/data/karusic/db:/var/lib/mysql - /workspace/data/karanage/db:/var/lib/mysql
mem_limit: 600m mem_limit: 600m
healthcheck: healthcheck:
test: ["CMD", "mysqladmin" ,"ping", "-h", "localhost"] test: ["CMD", "mysqladmin" ,"ping", "-h", "localhost"]
@ -19,28 +19,28 @@ services:
image: adminer:latest image: adminer:latest
restart: always restart: always
depends_on: depends_on:
- karusic_db_service - karanage_db_service
ports: ports:
- 19079:8080 - 19079:8080
links: links:
- karusic_db_service:db - karanage_db_service:db
read_only: false read_only: false
mem_limit: 100m mem_limit: 100m
karusic_back_service: karanage_back_service:
restart: always restart: always
image: gitea.atria-soft.org/kangaroo-and-rabbit/karusic:latest image: gitea.atria-soft.org/kangaroo-and-rabbit/karanage:latest
depends_on: depends_on:
- karusic_db_service - karanage_db_service
ports: ports:
- 19080:18080 - 19080:18080
env_file: env_file:
- ./config.env - ./config.env
links: links:
- karusic_db_service:db - karanage_db_service:db
read_only: true read_only: true
mem_limit: 1200m mem_limit: 1200m
healthcheck: 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 timeout: 20s
retries: 3 retries: 3