Files
soul-yongping/soul-api/deploy/Dockerfile.runner
Alex-larget 6df1736e1e 1
2026-03-20 14:47:37 +08:00

29 lines
738 B
Docker
Raw 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.

# soul-api Runner 容器
# 红蓝切换在容器内完成,宝塔固定 proxy_pass 到 127.0.0.1:9001
# 使用 network_mode: host无需端口映射避免 iptables 问题
FROM alpine:3.19
RUN apk add --no-cache \
ca-certificates tzdata wget nginx redis \
psmisc \
&& rm -rf /var/cache/apk/*
ENV TZ=Asia/Shanghai
WORKDIR /app
# 复制 Runner 脚本与 nginx 模板context 为 soul-api 根目录)
COPY deploy/runner/entrypoint.sh /app/
COPY deploy/runner/deploy.sh /app/
COPY deploy/runner/nginx.conf.template /app/
RUN chmod +x /app/entrypoint.sh /app/deploy.sh
# 创建目录blue/green 由 deploy.sh 创建)
RUN mkdir -p /app/uploads /app/blue /app/green
EXPOSE 9001
ENTRYPOINT ["/app/entrypoint.sh"]