最初版本

This commit is contained in:
sa19840531
2026-08-15 14:51:51 +08:00
parent 4e01df4dce
commit ea47ea4449
176 changed files with 21009 additions and 0 deletions
+39
View File
@@ -0,0 +1,39 @@
# 基于官方 Chatwoot production 镜像(构建时已 assets:precompile)
# 再叠 Flask;运行时 RAILS_ENV=production,不跑 development / vite
FROM chatwoot/chatwoot:v4.16.2
USER root
RUN apk add --no-cache python3 py3-pip py3-virtualenv
WORKDIR /opt/guest-cs
RUN python3 -m venv /opt/guest-cs/.venv
ENV PATH="/opt/guest-cs/.venv/bin:$PATH"
COPY flask/requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
COPY flask/ .
COPY start-all.sh /usr/local/bin/start-all.sh
RUN chmod +x /usr/local/bin/start-all.sh \
&& mkdir -p /app/storage \
&& sed -i 's/\r$//' /usr/local/bin/start-all.sh \
&& test -d /app/public/assets
# 与 docker-compose.production.yaml / 官方 Dockerfile 生产参数对齐
ENV RAILS_ENV=production \
NODE_ENV=production \
INSTALLATION_ENV=docker \
RAILS_SERVE_STATIC_FILES=true \
BUNDLE_WITHOUT=development:test \
EXECJS_RUNTIME=Disabled \
APP_HOST=0.0.0.0 \
APP_PORT=7788 \
APP_DEBUG=false \
CHATWOOT_GUEST_PROXY_TARGET=http://127.0.0.1:3000 \
CHATWOOT_GUEST_API_BASE=http://127.0.0.1:3000
EXPOSE 3000 7788
WORKDIR /app
ENTRYPOINT ["/usr/local/bin/start-all.sh"]