1
This commit is contained in:
28
soul-api/deploy/Dockerfile.runner
Normal file
28
soul-api/deploy/Dockerfile.runner
Normal file
@@ -0,0 +1,28 @@
|
||||
# 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"]
|
||||
Reference in New Issue
Block a user