0cb6a49aa5
- Add Docker Compose stack for single-server 1Panel deployments - Add backend and frontend Dockerfiles for 1Panel builds - Add Nginx and RocketMQ configuration for container orchestration - Document required environment variables and deployment steps
32 lines
634 B
Docker
32 lines
634 B
Docker
# syntax=docker/dockerfile:1
|
|
|
|
FROM maven:3.9-eclipse-temurin-17 AS build
|
|
|
|
WORKDIR /workspace
|
|
|
|
COPY . .
|
|
|
|
ARG MODULE
|
|
RUN mvn -pl "${MODULE}" -am package -Dmaven.test.skip=true
|
|
|
|
FROM eclipse-temurin:17-jre
|
|
|
|
ARG MODULE
|
|
ARG JAR_PREFIX
|
|
ARG INSTALL_FFMPEG=false
|
|
|
|
RUN if [ "$INSTALL_FFMPEG" = "true" ]; then \
|
|
apt-get update && \
|
|
apt-get install -y --no-install-recommends ffmpeg && \
|
|
apt-get clean && \
|
|
rm -rf /var/lib/apt/lists/*; \
|
|
fi
|
|
|
|
WORKDIR /app
|
|
|
|
COPY --from=build /workspace/${MODULE}/target/${JAR_PREFIX}-*.jar /app/app.jar
|
|
|
|
ENV JAVA_OPTS=""
|
|
|
|
ENTRYPOINT ["sh", "-c", "java ${JAVA_OPTS} -jar /app/app.jar"]
|