mirror of
https://github.com/makeplane/plane.git
synced 2026-09-01 19:48:42 +02:00
* refactor: migrate from nginx to Caddy for admin and web services
- Updated Dockerfiles to use Caddy as the web server instead of nginx.
- Added Caddyfile configurations for both admin and web services.
- Implemented rate limiting in Caddy using xcaddy.
- Adjusted healthcheck endpoint to reflect new routing in Caddy.
* refactor: remove nginx configuration files for admin and web services
- Deleted nginx.conf files as part of the migration to Caddy.
- Updated Dockerfile to reflect changes in the Caddy build process.
* fix: address review feedback on Caddy configuration
- admin: fix SPA fallback to /god-mode/index.html so deep links resolve
- restrict trusted_proxies to private_ranges instead of 0.0.0.0
- wire rate_limit zone so the compiled caddy-ratelimit module is used
* fix: use client_ip for rate limiting and restore security headers
- rate_limit key {remote_host} -> {client_ip} so per-client buckets are
keyed on the real client IP forwarded by the proxy, not the proxy
connection source
- restore security headers previously emitted by nginx
(X-Frame-Options, X-Content-Type-Options, X-XSS-Protection);
HSTS remains at the TLS terminator
---------
Co-authored-by: Pratapa Lakshmi <gouthampratapa8@gmail.com>
67 lines
2.0 KiB
Docker
67 lines
2.0 KiB
Docker
ARG PLANE_VERSION=v0.27.1
|
|
FROM --platform=$BUILDPLATFORM tonistiigi/binfmt AS binfmt
|
|
|
|
# **************************************************
|
|
# STAGE 0: Image Loading
|
|
# **************************************************
|
|
FROM node:22-alpine AS node
|
|
|
|
FROM makeplane/plane-frontend:${PLANE_VERSION} AS web-img
|
|
FROM makeplane/plane-backend:${PLANE_VERSION} AS backend-img
|
|
FROM makeplane/plane-space:${PLANE_VERSION} AS space-img
|
|
FROM makeplane/plane-admin:${PLANE_VERSION} AS admin-img
|
|
FROM makeplane/plane-live:${PLANE_VERSION} AS live-img
|
|
FROM makeplane/plane-proxy:${PLANE_VERSION} AS proxy-img
|
|
|
|
# **************************************************
|
|
# STAGE 1: Runner
|
|
# **************************************************
|
|
FROM python:3.12.10-alpine AS runner
|
|
|
|
WORKDIR /app
|
|
|
|
RUN apk add --no-cache \
|
|
"libpq" \
|
|
"libxslt" \
|
|
"xmlsec"
|
|
|
|
|
|
COPY --from=node /usr/lib /usr/lib
|
|
COPY --from=node /usr/local/lib /usr/local/lib
|
|
COPY --from=node /usr/local/include /usr/local/include
|
|
COPY --from=node /usr/local/bin /usr/local/bin
|
|
|
|
COPY --from=web-img /usr/share/caddy/html /app/web
|
|
COPY --from=space-img /app /app/space
|
|
COPY --from=admin-img /usr/share/caddy/html/god-mode /app/admin
|
|
COPY --from=live-img /app /app/live
|
|
|
|
RUN rm -rf /app/space/apps/space/.next/cache
|
|
|
|
COPY --from=proxy-img /usr/bin/caddy /usr/bin/caddy
|
|
COPY dist/Caddyfile /app/proxy/Caddyfile
|
|
|
|
COPY --from=backend-img /code /app/backend
|
|
COPY --from=backend-img /usr/local/lib/python3.12/site-packages/ /usr/local/lib/python3.12/site-packages/
|
|
COPY --from=backend-img /usr/local/bin/ /usr/local/bin/
|
|
|
|
RUN apk add --no-cache nss-tools bash curl uuidgen ncdu vim
|
|
|
|
RUN pip install supervisor
|
|
RUN mkdir -p /etc/supervisor/conf.d
|
|
|
|
COPY start.sh /app/start.sh
|
|
COPY dist/plane.env /app/plane.env
|
|
COPY supervisor.conf /etc/supervisor/conf.d/supervisor.conf
|
|
|
|
RUN mkdir -p /app/logs/access && \
|
|
mkdir -p /app/logs/error && \
|
|
mkdir -p /app/data && \
|
|
chmod +x /app/start.sh
|
|
|
|
VOLUME ["/app/data", "/app/logs"]
|
|
|
|
EXPOSE 80 443
|
|
|
|
CMD ["/app/start.sh"]
|