Compare commits

...

12 Commits

Author SHA1 Message Date
akshat5302
89fc172382 refactor: update build context and remove deprecated proxy files
* Updated build context and Dockerfile paths in GitHub Actions workflow.
* Removed obsolete Caddyfile and Dockerfile for the proxy service.
2025-07-09 15:54:37 +05:30
akshat5302
13551dd32c Merge branch 'preview' of https://github.com/makeplane/plane into add-caddy-proxy 2025-07-09 14:28:08 +05:30
akshat5302
a4b4797a32 Update variables.env to clarify CERT_EMAIL configuration
* Adjusted comments in variables.env to specify the format for CERT_EMAIL and removed redundant lines, ensuring clearer instructions for SSL certificate generation.
2025-06-25 12:55:03 +05:30
akshat5302
f68f889e2a Refactor Caddyfile to remove default value for CERT_EMAIL variable
* Updated Caddyfile to directly use the CERT_EMAIL variable without a default value, aligning with recent changes in environment variable handling.
2025-06-25 12:17:15 +05:30
akshat5302
03ec96f27c Update Caddyfile reference in Dockerfile for proxy setup 2025-06-25 12:08:36 +05:30
akshat5302
a301342903 Update environment variable handling and Caddy configuration
* Removed default value for CERT_EMAIL in docker-compose and variables.env to enforce explicit configuration.
* Updated Caddyfile to use the CERT_EMAIL variable without a default value.
* Increased max_header_size in Caddyfile for improved request handling.
* Updated Dockerfile to use specific versions for dependencies, enhancing build stability.
2025-06-25 12:06:37 +05:30
akshat5302
47746a4fd4 Refactor Dockerfile for Caddy proxy setup
* Transitioned to a multi-stage build using caddy:builder for enhanced customization.
* Integrated Cloudflare DNS support and added necessary dependencies.
* Updated Caddyfile and entrypoint configuration for improved deployment.
2025-06-25 11:36:51 +05:30
akshat5302
74926ea46c Merge branch 'preview' of https://github.com/makeplane/plane into add-caddy-proxy 2025-06-25 11:30:01 +05:30
akshat5302
a46b3ba01e Refactor Caddy setup and update build configuration
* Removed Caddy-related files and scripts as part of the transition to a new proxy setup.
* Updated GitHub Actions workflow to use the new Dockerfile and build context for the proxy.
* Added SITE_ADDRESS environment variable to docker-compose and variables.env for improved configuration management.
2025-06-25 11:28:57 +05:30
akshat5302
b1c2987c6d Enhance Caddy configuration and update environment variables
* Added note in caddy.sh regarding the persistence of SITE_ADDRESS in Docker.
* Updated docker-compose.yml to use dynamic CERT_ACME_CA and added CERT_ACME_DNS variable.
* Documented CERT_ACME_DNS usage in variables.env for DNS challenge certificate generation.
2025-06-23 17:19:37 +05:30
akshat5302
25490663f6 update github Docker build context for Caddy
* Changed build context and Dockerfile path from Nginx to Caddy in the GitHub Actions workflow.
* Ensured compatibility with the new Caddy configuration.
2025-06-23 13:30:34 +05:30
akshat5302
432f161ce6 [INFRA-195] feat: update docker-compose and environment variables for proxy configuration
* Added SSL and domain configuration options to the proxy environment.
* Updated port mappings for HTTP and HTTPS in docker-compose.
* Introduced new environment variables for SSL certificate management.
* Refactored existing variables for clarity and consistency.
2025-06-23 11:39:16 +05:30
5 changed files with 97 additions and 16 deletions

View File

@@ -242,8 +242,8 @@ jobs:
dockerhub-token: ${{ secrets.DOCKERHUB_TOKEN }}
docker-image-owner: makeplane
docker-image-name: ${{ needs.branch_build_setup.outputs.dh_img_proxy }}
build-context: ./nginx
dockerfile-path: ./nginx/Dockerfile
build-context: ./apps/proxy
dockerfile-path: ./apps/proxy/Dockerfile.ce
buildx-driver: ${{ needs.branch_build_setup.outputs.gh_buildx_driver }}
buildx-version: ${{ needs.branch_build_setup.outputs.gh_buildx_version }}
buildx-platforms: ${{ needs.branch_build_setup.outputs.gh_buildx_platforms }}

34
apps/proxy/Caddyfile.ce Normal file
View File

@@ -0,0 +1,34 @@
(plane_proxy) {
request_body {
max_size {$FILE_SIZE_LIMIT}
}
reverse_proxy /spaces/* space:3000
reverse_proxy /god-mode/* admin:3000
reverse_proxy /live/* live:3000
reverse_proxy /api/* api:8000
reverse_proxy /auth/* api:8000
reverse_proxy /{$BUCKET_NAME}/* plane-minio:9000
reverse_proxy /* web:3000
}
{
{$CERT_EMAIL}
acme_ca {$CERT_ACME_CA:https://acme-v02.api.letsencrypt.org/directory}
{$CERT_ACME_DNS}
servers {
max_header_size 25MB
client_ip_headers X-Forwarded-For X-Real-IP
trusted_proxies static {$TRUSTED_PROXIES:0.0.0.0/0}
}
}
{$SITE_ADDRESS} {
import plane_proxy
}

14
apps/proxy/Dockerfile.ce Normal file
View File

@@ -0,0 +1,14 @@
FROM caddy:2.10.0-builder-alpine AS caddy-builder
RUN xcaddy build \
--with github.com/caddy-dns/cloudflare@v0.2.1 \
--with github.com/caddy-dns/digitalocean@04bde2867106aa1b44c2f9da41a285fa02e629c5 \
--with github.com/mholt/caddy-l4@4d3c80e89c5f80438a3e048a410d5543ff5fb9f4
FROM caddy:2.10.0-builder-alpine
RUN apk add nss-tools bash curl
COPY --from=caddy-builder /usr/bin/caddy /usr/bin/caddy
COPY Caddyfile.ce /etc/caddy/Caddyfile

View File

@@ -24,9 +24,16 @@ x-aws-s3-env: &aws-s3-env
AWS_S3_BUCKET_NAME: ${AWS_S3_BUCKET_NAME:-uploads}
x-proxy-env: &proxy-env
NGINX_PORT: ${NGINX_PORT:-80}
BUCKET_NAME: ${AWS_S3_BUCKET_NAME:-uploads}
SSL: ${SSL:-false}
APP_DOMAIN: ${APP_DOMAIN:-localhost}
FILE_SIZE_LIMIT: ${FILE_SIZE_LIMIT:-5242880}
CERT_EMAIL: ${CERT_EMAIL}
CERT_ACME_CA: ${CERT_ACME_CA}
CERT_ACME_DNS: ${CERT_ACME_DNS}
LISTEN_HTTP_PORT: ${LISTEN_PORT:-80}
LISTEN_HTTPS_PORT: ${LISTEN_SSL_PORT:-443}
BUCKET_NAME: ${AWS_S3_BUCKET_NAME:-uploads}
SITE_ADDRESS: ${SITE_ADDRESS:-:80}
x-mq-env: &mq-env # RabbitMQ Settings
RABBITMQ_HOST: ${RABBITMQ_HOST:-plane-mq}
@@ -212,22 +219,31 @@ services:
# Comment this if you already have a reverse proxy running
proxy:
image: artifacts.plane.so/makeplane/plane-proxy:${APP_RELEASE:-stable}
ports:
- target: 80
published: ${NGINX_PORT:-80}
protocol: tcp
mode: host
environment:
<<: *proxy-env
image: artifacts.plane.so/makeplane/plane-proxy:${APP_RELEASE_VERSION}
deploy:
replicas: 1
restart_policy:
condition: on-failure
environment:
<<: *proxy-env
ports:
- target: 80
published: ${LISTEN_HTTP_PORT:-80}
protocol: tcp
mode: host
- target: 443
published: ${LISTEN_HTTPS_PORT:-443}
protocol: tcp
mode: host
volumes:
- proxy_config:/config
- proxy_data:/data
depends_on:
- web
- api
- space
- web
- api
- space
- admin
- live
volumes:
pgdata:
@@ -238,3 +254,5 @@ volumes:
logs_beat-worker:
logs_migrator:
rabbitmq_data:
proxy_config:
proxy_data:

View File

@@ -1,5 +1,6 @@
APP_DOMAIN=localhost
APP_RELEASE=stable
SSL=false
WEB_REPLICAS=1
SPACE_REPLICAS=1
@@ -9,7 +10,8 @@ WORKER_REPLICAS=1
BEAT_WORKER_REPLICAS=1
LIVE_REPLICAS=1
NGINX_PORT=80
LISTEN_PORT=80
LISTEN_SSL_PORT=443
WEB_URL=http://${APP_DOMAIN}
DEBUG=0
CORS_ALLOWED_ORIGINS=http://${APP_DOMAIN}
@@ -38,6 +40,19 @@ RABBITMQ_PASSWORD=plane
RABBITMQ_VHOST=plane
AMQP_URL=
# If SSL Cert to be generated, set CERT_EMAIl="email <EMAIL_ADDRESS>"
CERT_ACME_CA=https://acme-v02.api.letsencrypt.org/directory
TRUSTED_PROXIES=0.0.0.0/0
SITE_ADDRESS=:80
CERT_EMAIL=
# For DNS Challenge based certificate generation, set the CERT_ACME_DNS, CERT_EMAIL
# CERT_ACME_DNS="acme_dns <CERT_DNS_PROVIDER> <CERT_DNS_PROVIDER_API_KEY>"
CERT_ACME_DNS=
# Secret Key
SECRET_KEY=60gp0byfz2dvffa45cxl20p1scy9xbpf6d8c5y0geejgkyp1b5