Files
ai-customer-service/guest-cs-stack/Dockerfile.allinone
T
2026-08-15 14:51:51 +08:00

40 lines
1.1 KiB
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.
# 基于官方 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"]