Add czleilei240 runtime profiles, frontend domains, contract paths, and Docker deployment updates so the integral shop can run against the Leilei environment. Co-authored-by: Cursor <cursoragent@cursor.com>
55 lines
2.1 KiB
Docker
55 lines
2.1 KiB
Docker
# =============================================================
|
||
# 积分商城 管理端 API(miao-admin-2.2.jar)
|
||
# JAR 由宿主机 bind-mount 进来(/app/app.jar),无需 Maven 编译
|
||
# 宿主机路径:${SINGLE_ADMIN_JAR} → /app/app.jar
|
||
# FTP 更新 JAR 后:docker compose --env-file .env restart single-admin-api
|
||
# =============================================================
|
||
|
||
FROM eclipse-temurin:17-jre-jammy
|
||
|
||
ENV TZ=Asia/Shanghai \
|
||
LANG=C.UTF-8 LC_ALL=C.UTF-8 \
|
||
DEBIAN_FRONTEND=noninteractive
|
||
|
||
# 切换阿里云 Ubuntu 镜像源(服务器访问 archive.ubuntu.com 超时)
|
||
RUN sed -i \
|
||
-e 's|http://archive.ubuntu.com|https://mirrors.aliyun.com|g' \
|
||
-e 's|http://security.ubuntu.com|https://mirrors.aliyun.com|g' \
|
||
/etc/apt/sources.list
|
||
|
||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||
tzdata ca-certificates curl \
|
||
fontconfig fonts-dejavu fonts-wqy-zenhei \
|
||
&& ln -sf /usr/share/zoneinfo/$TZ /etc/localtime \
|
||
&& echo $TZ > /etc/timezone \
|
||
&& rm -rf /var/lib/apt/lists/* \
|
||
&& mkdir -p /app /config /usr/local/crmeb/crmebimage /app/log
|
||
|
||
# 堆大小(可通过 compose environment 覆盖)
|
||
ENV JAVA_HEAP_OPTS="-Xms128m -Xmx256m"
|
||
|
||
# Spring Boot 2.2.6 + Java 17 必须的模块开放参数
|
||
ENV JAVA_MODULE_OPTS="\
|
||
--add-opens java.base/java.lang=ALL-UNNAMED \
|
||
--add-opens java.base/java.lang.reflect=ALL-UNNAMED \
|
||
--add-opens java.base/java.util=ALL-UNNAMED \
|
||
--add-opens java.base/java.io=ALL-UNNAMED \
|
||
--add-opens java.base/java.math=ALL-UNNAMED \
|
||
--add-opens java.base/sun.net.util=ALL-UNNAMED \
|
||
--add-opens java.base/java.net=ALL-UNNAMED"
|
||
|
||
WORKDIR /app
|
||
# /app/app.jar 由 docker-compose volumes bind-mount 进来
|
||
EXPOSE 30032
|
||
|
||
# 等价于:nohup java -Xms128m -Xmx256m -jar miao-admin-2.2.jar > admin.log &
|
||
ENTRYPOINT ["sh","-c","exec java \
|
||
$JAVA_HEAP_OPTS \
|
||
$JAVA_MODULE_OPTS \
|
||
-Dfile.encoding=UTF-8 \
|
||
-Duser.timezone=$TZ \
|
||
-jar /app/app.jar \
|
||
--spring.profiles.active=${SPRING_PROFILES_ACTIVE:-docker} \
|
||
--spring.config.additional-location=file:/config/ \
|
||
--server.port=${SERVER_PORT:-30032}"]
|