-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile-api
More file actions
42 lines (30 loc) 路 1.26 KB
/
Copy pathDockerfile-api
File metadata and controls
42 lines (30 loc) 路 1.26 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
FROM maven:3.9.4-eclipse-temurin-21 AS build
# Install Node.js pour Angular
RUN curl -fsSL https://deb.nodesource.com/setup_20.x | bash - && \
apt-get update && apt-get install -y nodejs tzdata && \
rm -rf /var/lib/apt/lists/*
WORKDIR /app
# Copier le pom parent et tous les modules n茅cessaires pour Maven multi-modules
COPY pom.xml .
COPY itexpert-content-parent ./itexpert-content-parent
COPY itexpert-content-lib ./itexpert-content-lib
COPY itexpert-content-core ./itexpert-content-core
COPY itexpert-content-api ./itexpert-content-api
COPY itexpert-content-ui ./itexpert-content-ui
# Copier package.json pour Angular
COPY itexpert-content-ui/package*.json ./itexpert-content-ui/
# Installer les d茅pendances Angular
RUN cd itexpert-content-ui && npm install
# Build complet Maven
RUN mvn clean package -DskipTests
# Image finale runtime
FROM eclipse-temurin:21
ENV APP_HOME=/app
RUN mkdir -p ${APP_HOME}/bin ${APP_HOME}/config ${APP_HOME}/logs
# Copier uniquement le jar API g茅n茅r茅
COPY --from=build /app/itexpert-content-api/target/*.jar ${APP_HOME}/bin/app.jar
COPY itexpert-content-api/entrypoint.sh ${APP_HOME}
RUN chmod +x ${APP_HOME}/entrypoint.sh
EXPOSE 1080
ENTRYPOINT ["/app/entrypoint.sh"]
HEALTHCHECK CMD curl --fail http://localhost:1080/health || exit 1