Files
integral-shop/deploy/docker/single-shop/front-api.Dockerfile
danaisuiyuan cef4398a5a feat(deploy): configure czleilei240 integral shop
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>
2026-05-17 19:13:01 +08:00

55 lines
2.1 KiB
Docker
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# =============================================================
# 积分商城 用户端 APImiao-front-2.2.jar
# JAR 由宿主机 bind-mount 进来(/app/app.jar无需 Maven 编译
# 宿主机路径:${SINGLE_FRONT_JAR} → /app/app.jar
# FTP 更新 JAR 后docker compose --env-file .env restart single-front-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 30033
# 等价于nohup java -Xms128m -Xmx256m -jar miao-front-2.2.jar > front.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:-30033}"]