From de2cb6baab1905087da87afdd63be66f69410aee Mon Sep 17 00:00:00 2001 From: Akshat Jain Date: Tue, 20 Aug 2024 12:57:24 +0530 Subject: [PATCH 01/19] Separated environment variables for specific app containers. --- deploy/selfhost/docker-compose.yml | 106 +++++++++++++++-------------- 1 file changed, 56 insertions(+), 50 deletions(-) diff --git a/deploy/selfhost/docker-compose.yml b/deploy/selfhost/docker-compose.yml index c574c191509..ea600c86c54 100644 --- a/deploy/selfhost/docker-compose.yml +++ b/deploy/selfhost/docker-compose.yml @@ -1,47 +1,47 @@ +x-db-env: &db-env + PGHOST: ${PGHOST:-plane-db} + PGDATABASE: ${PGDATABASE:-plane} + POSTGRES_USER: ${POSTGRES_USER:-plane} + POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-plane} + POSTGRES_DB: ${POSTGRES_DB:-plane} + POSTGRES_PORT: ${POSTGRES_PORT:-5432} + PGDATA: ${PGDATA:-/var/lib/postgresql/data} + +x-redis-env: &redis-env + REDIS_HOST: ${REDIS_HOST:-plane-redis} + REDIS_PORT: ${REDIS_PORT:-6379} + REDIS_URL: ${REDIS_URL:-redis://plane-redis:6379/} + +x-data-store-env: &data-store-env + USE_MINIO: ${USE_MINIO:-1} + MINIO_ROOT_USER: ${MINIO_ROOT_USER:-access-key} + MINIO_ROOT_PASSWORD: ${MINIO_ROOT_PASSWORD:-secret-key} + AWS_REGION: ${AWS_REGION:-} + AWS_ACCESS_KEY_ID: ${AWS_ACCESS_KEY_ID:-access-key} + AWS_SECRET_ACCESS_KEY: ${AWS_SECRET_ACCESS_KEY:-secret-key} + AWS_S3_ENDPOINT_URL: ${AWS_S3_ENDPOINT_URL:-http://plane-minio:9000} + AWS_S3_BUCKET_NAME: ${AWS_S3_BUCKET_NAME:-uploads} + BUCKET_NAME: ${BUCKET_NAME:-uploads} + +x-proxy-env: &proxy-env + NGINX_PORT: ${NGINX_PORT:-80} + FILE_SIZE_LIMIT: ${FILE_SIZE_LIMIT:-5242880} + x-app-env: &app-env - environment: - - NGINX_PORT=${NGINX_PORT:-80} - - WEB_URL=${WEB_URL:-http://localhost} - - DEBUG=${DEBUG:-0} - - SENTRY_DSN=${SENTRY_DSN} - - SENTRY_ENVIRONMENT=${SENTRY_ENVIRONMENT:-"production"} - - CORS_ALLOWED_ORIGINS=${CORS_ALLOWED_ORIGINS} - # Gunicorn Workers - - GUNICORN_WORKERS=${GUNICORN_WORKERS:-1} - #DB SETTINGS - - PGHOST=${PGHOST:-plane-db} - - PGDATABASE=${PGDATABASE:-plane} - - POSTGRES_USER=${POSTGRES_USER:-plane} - - POSTGRES_PASSWORD=${POSTGRES_PASSWORD:-plane} - - POSTGRES_DB=${POSTGRES_DB:-plane} - - POSTGRES_PORT=${POSTGRES_PORT:-5432} - - PGDATA=${PGDATA:-/var/lib/postgresql/data} - - DATABASE_URL=${DATABASE_URL:-postgresql://plane:plane@plane-db/plane} - # REDIS SETTINGS - - REDIS_HOST=${REDIS_HOST:-plane-redis} - - REDIS_PORT=${REDIS_PORT:-6379} - - REDIS_URL=${REDIS_URL:-redis://plane-redis:6379/} - # Application secret - - SECRET_KEY=${SECRET_KEY:-60gp0byfz2dvffa45cxl20p1scy9xbpf6d8c5y0geejgkyp1b5} - # DATA STORE SETTINGS - - USE_MINIO=${USE_MINIO:-1} - - AWS_REGION=${AWS_REGION:-""} - - AWS_ACCESS_KEY_ID=${AWS_ACCESS_KEY_ID:-"access-key"} - - AWS_SECRET_ACCESS_KEY=${AWS_SECRET_ACCESS_KEY:-"secret-key"} - - AWS_S3_ENDPOINT_URL=${AWS_S3_ENDPOINT_URL:-http://plane-minio:9000} - - AWS_S3_BUCKET_NAME=${AWS_S3_BUCKET_NAME:-uploads} - - MINIO_ROOT_USER=${MINIO_ROOT_USER:-"access-key"} - - MINIO_ROOT_PASSWORD=${MINIO_ROOT_PASSWORD:-"secret-key"} - - BUCKET_NAME=${BUCKET_NAME:-uploads} - - FILE_SIZE_LIMIT=${FILE_SIZE_LIMIT:-5242880} - # Admin and Space URLs - - ADMIN_BASE_URL=${ADMIN_BASE_URL} - - SPACE_BASE_URL=${SPACE_BASE_URL} - - APP_BASE_URL=${APP_BASE_URL} + WEB_URL: ${WEB_URL:-http://localhost} + DEBUG: ${DEBUG:-0} + SENTRY_DSN: ${SENTRY_DSN} + SENTRY_ENVIRONMENT: ${SENTRY_ENVIRONMENT:-production} + CORS_ALLOWED_ORIGINS: ${CORS_ALLOWED_ORIGINS} + GUNICORN_WORKERS: 1 + DATABASE_URL: ${DATABASE_URL:-postgresql://plane:plane@plane-db/plane} + SECRET_KEY: ${SECRET_KEY:-60gp0byfz2dvffa45cxl20p1scy9xbpf6d8c5y0geejgkyp1b5} + ADMIN_BASE_URL: ${ADMIN_BASE_URL} + SPACE_BASE_URL: ${SPACE_BASE_URL} + APP_BASE_URL: ${APP_BASE_URL} services: web: - <<: *app-env image: ${DOCKERHUB_USER:-makeplane}/plane-frontend:${APP_RELEASE:-stable} platform: ${DOCKER_PLATFORM:-} pull_policy: if_not_present @@ -54,7 +54,6 @@ services: - worker space: - <<: *app-env image: ${DOCKERHUB_USER:-makeplane}/plane-space:${APP_RELEASE:-stable} platform: ${DOCKER_PLATFORM:-} pull_policy: if_not_present @@ -68,7 +67,6 @@ services: - web admin: - <<: *app-env image: ${DOCKERHUB_USER:-makeplane}/plane-admin:${APP_RELEASE:-stable} platform: ${DOCKER_PLATFORM:-} pull_policy: if_not_present @@ -81,7 +79,6 @@ services: - web api: - <<: *app-env image: ${DOCKERHUB_USER:-makeplane}/plane-backend:${APP_RELEASE:-stable} platform: ${DOCKER_PLATFORM:-} pull_policy: if_not_present @@ -91,12 +88,13 @@ services: replicas: ${API_REPLICAS:-1} volumes: - logs_api:/code/plane/logs + environment: + <<: [ *app-env, *db-env, *redis-env, *data-store-env, *proxy-env ] depends_on: - plane-db - plane-redis worker: - <<: *app-env image: ${DOCKERHUB_USER:-makeplane}/plane-backend:${APP_RELEASE:-stable} platform: ${DOCKER_PLATFORM:-} pull_policy: if_not_present @@ -104,13 +102,14 @@ services: command: ./bin/docker-entrypoint-worker.sh volumes: - logs_worker:/code/plane/logs + environment: + <<: [ *app-env, *db-env, *redis-env, *data-store-env, *proxy-env ] depends_on: - api - plane-db - plane-redis beat-worker: - <<: *app-env image: ${DOCKERHUB_USER:-makeplane}/plane-backend:${APP_RELEASE:-stable} platform: ${DOCKER_PLATFORM:-} pull_policy: if_not_present @@ -118,13 +117,14 @@ services: command: ./bin/docker-entrypoint-beat.sh volumes: - logs_beat-worker:/code/plane/logs + environment: + <<: [ *app-env, *db-env, *redis-env, *data-store-env, *proxy-env ] depends_on: - api - plane-db - plane-redis migrator: - <<: *app-env image: ${DOCKERHUB_USER:-makeplane}/plane-backend:${APP_RELEASE:-stable} platform: ${DOCKER_PLATFORM:-} pull_policy: if_not_present @@ -132,45 +132,51 @@ services: command: ./bin/docker-entrypoint-migrator.sh volumes: - logs_migrator:/code/plane/logs + environment: + <<: [ *app-env, *db-env, *redis-env, *data-store-env, *proxy-env ] depends_on: - plane-db - plane-redis plane-db: - <<: *app-env image: postgres:15.7-alpine pull_policy: if_not_present restart: unless-stopped command: postgres -c 'max_connections=1000' + environment: + <<: *db-env volumes: - pgdata:/var/lib/postgresql/data plane-redis: - <<: *app-env image: valkey/valkey:7.2.5-alpine pull_policy: if_not_present restart: unless-stopped + environment: + <<: *redis-env volumes: - redisdata:/data plane-minio: - <<: *app-env image: minio/minio:latest pull_policy: if_not_present restart: unless-stopped command: server /export --console-address ":9090" + environment: + <<: *data-store-env volumes: - uploads:/export # Comment this if you already have a reverse proxy running proxy: - <<: *app-env image: ${DOCKERHUB_USER:-makeplane}/plane-proxy:${APP_RELEASE:-stable} platform: ${DOCKER_PLATFORM:-} pull_policy: if_not_present restart: unless-stopped ports: - ${NGINX_PORT}:80 + environment: + <<: *proxy-env depends_on: - web - api From 779a9c0e47795385d0d7b46d2e0c63e812b317f6 Mon Sep 17 00:00:00 2001 From: Akshat Jain Date: Mon, 26 Aug 2024 18:33:19 +0530 Subject: [PATCH 02/19] added caddy setup for with or without SSL --- .github/workflows/build-branch.yml | 4 ++-- caddy/Caddyfile.template | 32 ++++++++++++++++++++++++++++++ caddy/Dockerfile | 9 +++++++++ caddy/caddy.sh | 4 ++++ deploy/selfhost/docker-compose.yml | 15 +++++++++++++- 5 files changed, 61 insertions(+), 3 deletions(-) create mode 100644 caddy/Caddyfile.template create mode 100644 caddy/Dockerfile create mode 100644 caddy/caddy.sh diff --git a/.github/workflows/build-branch.yml b/.github/workflows/build-branch.yml index 0ccccda5fd6..4d27af53f41 100644 --- a/.github/workflows/build-branch.yml +++ b/.github/workflows/build-branch.yml @@ -330,8 +330,8 @@ jobs: - name: Build and Push Plane-Proxy to Docker Hub uses: docker/build-push-action@v5.1.0 with: - context: ./nginx - file: ./nginx/Dockerfile + context: ./caddy + file: ./caddy/Dockerfile platforms: ${{ env.BUILDX_PLATFORMS }} tags: ${{ env.PROXY_TAG }} push: true diff --git a/caddy/Caddyfile.template b/caddy/Caddyfile.template new file mode 100644 index 00000000000..632ba11f87e --- /dev/null +++ b/caddy/Caddyfile.template @@ -0,0 +1,32 @@ +(plane_proxy) { + request_body { + max_size {$FILE_SIZE_LIMIT} + } + + reverse_proxy /spaces/* space:3000 + + reverse_proxy /god-mode/* admin:3000 + + reverse_proxy /api/* api:8000 + + reverse_proxy /auth/* api:8000 + + reverse_proxy /{$BUCKET_NAME}/* plane-minio:9000 + + reverse_proxy /* web:3000 +} + +{ + email {$CERT_EMAIL:admin@example.com} + acme_ca {$CERT_ACME_CA} + {$CERT_ACME_DNS} + servers { + max_header_size 5MB + client_ip_headers X-Forwarded-For X-Real-IP + trusted_proxies static {$TRUSTED_PROXIES:0.0.0.0/0} + } +} + +{$SITE_ADDRESS} { + import plane_proxy +} diff --git a/caddy/Dockerfile b/caddy/Dockerfile new file mode 100644 index 00000000000..5dd666163f3 --- /dev/null +++ b/caddy/Dockerfile @@ -0,0 +1,9 @@ +FROM makeplane/caddy:latest + +COPY ./Caddyfile.template /etc/caddy/Caddyfile + +COPY ./caddy.sh /docker-entrypoint.sh + +RUN chmod +x /docker-entrypoint.sh + +CMD ["/docker-entrypoint.sh"] diff --git a/caddy/caddy.sh b/caddy/caddy.sh new file mode 100644 index 00000000000..792d5a5dc30 --- /dev/null +++ b/caddy/caddy.sh @@ -0,0 +1,4 @@ +#!/bin/sh + +export SITE_ADDRESS=$(if [ "$SSL" = "true" ]; then echo "${APP_DOMAIN}"; else echo "http://${APP_DOMAIN}"; fi) +exec caddy run --config /etc/caddy/Caddyfile diff --git a/deploy/selfhost/docker-compose.yml b/deploy/selfhost/docker-compose.yml index ea600c86c54..e4931c80eb0 100644 --- a/deploy/selfhost/docker-compose.yml +++ b/deploy/selfhost/docker-compose.yml @@ -24,8 +24,14 @@ x-data-store-env: &data-store-env BUCKET_NAME: ${BUCKET_NAME:-uploads} x-proxy-env: &proxy-env + SSL: ${SSL:-false} + APP_DOMAIN: ${APP_DOMAIN:-localhost} NGINX_PORT: ${NGINX_PORT:-80} FILE_SIZE_LIMIT: ${FILE_SIZE_LIMIT:-5242880} + CERT_EMAIL: ${CERT_EMAIL:-akshatjain9782@gmail.com} + CERT_ACME_CA: ${CERT_ACME_CA:-} + LISTEN_HTTP_PORT: ${LISTEN_HTTP_PORT:-80} + LISTEN_HTTPS_PORT: ${LISTEN_HTTPS_PORT:-443} x-app-env: &app-env WEB_URL: ${WEB_URL:-http://localhost} @@ -174,7 +180,11 @@ services: pull_policy: if_not_present restart: unless-stopped ports: - - ${NGINX_PORT}:80 + - ${LISTEN_HTTP_PORT:-80}:${LISTEN_HTTP_PORT:-80} + - ${LISTEN_HTTPS_PORT:-443}:${LISTEN_HTTPS_PORT:-443} + volumes: + - caddy_config:/config + - caddy_data:/data environment: <<: *proxy-env depends_on: @@ -190,3 +200,6 @@ volumes: logs_worker: logs_beat-worker: logs_migrator: + caddy_config: + caddy_data: + \ No newline at end of file From 99ab3386b55bf8e76343dc293b38c9960437c525 Mon Sep 17 00:00:00 2001 From: Akshat Jain Date: Mon, 26 Aug 2024 18:55:11 +0530 Subject: [PATCH 03/19] added envs in variables file --- deploy/selfhost/variables.env | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/deploy/selfhost/variables.env b/deploy/selfhost/variables.env index 4120ee502aa..63d4b10c6d3 100644 --- a/deploy/selfhost/variables.env +++ b/deploy/selfhost/variables.env @@ -1,5 +1,6 @@ APP_DOMAIN=localhost APP_RELEASE=stable +SSL=false WEB_REPLICAS=1 SPACE_REPLICAS=1 @@ -28,6 +29,11 @@ REDIS_HOST=plane-redis REDIS_PORT=6379 REDIS_URL= +# If SSL Cert to be generated, set CERT_EMAIL and APP_PROTOCOL to https +CERT_EMAIL=akshatjain9782@gmail.com +CERT_ACME_CA=https://acme-v02.api.letsencrypt.org/directory +TRUSTED_PROXIES=0.0.0.0/0 + # Secret Key SECRET_KEY=60gp0byfz2dvffa45cxl20p1scy9xbpf6d8c5y0geejgkyp1b5 From da11073894474f84ece0e4c3f9c4f3c0ae12b14b Mon Sep 17 00:00:00 2001 From: Akshat Jain Date: Wed, 28 Aug 2024 13:57:34 +0530 Subject: [PATCH 04/19] fix: handling localhost as APP_DOMAIN --- caddy/caddy.sh | 9 ++++++++- deploy/selfhost/docker-compose.yml | 5 ++--- deploy/selfhost/variables.env | 3 ++- 3 files changed, 12 insertions(+), 5 deletions(-) diff --git a/caddy/caddy.sh b/caddy/caddy.sh index 792d5a5dc30..0392a16c949 100644 --- a/caddy/caddy.sh +++ b/caddy/caddy.sh @@ -1,4 +1,11 @@ #!/bin/sh -export SITE_ADDRESS=$(if [ "$SSL" = "true" ]; then echo "${APP_DOMAIN}"; else echo "http://${APP_DOMAIN}"; fi) +if [ "$APP_DOMAIN" == "localhost" ]; then + export SITE_ADDRESS=":${LISTEN_HTTP_PORT}" +elif [ "$SSL" == "true" ]; then + export SITE_ADDRESS="${APP_DOMAIN}:${LISTEN_HTTPS_PORT}" +else + export SITE_ADDRESS="http://${APP_DOMAIN}:${LISTEN_HTTP_PORT}" +fi + exec caddy run --config /etc/caddy/Caddyfile diff --git a/deploy/selfhost/docker-compose.yml b/deploy/selfhost/docker-compose.yml index e4931c80eb0..32a379fa521 100644 --- a/deploy/selfhost/docker-compose.yml +++ b/deploy/selfhost/docker-compose.yml @@ -26,12 +26,11 @@ x-data-store-env: &data-store-env x-proxy-env: &proxy-env SSL: ${SSL:-false} APP_DOMAIN: ${APP_DOMAIN:-localhost} - NGINX_PORT: ${NGINX_PORT:-80} FILE_SIZE_LIMIT: ${FILE_SIZE_LIMIT:-5242880} CERT_EMAIL: ${CERT_EMAIL:-akshatjain9782@gmail.com} CERT_ACME_CA: ${CERT_ACME_CA:-} - LISTEN_HTTP_PORT: ${LISTEN_HTTP_PORT:-80} - LISTEN_HTTPS_PORT: ${LISTEN_HTTPS_PORT:-443} + LISTEN_HTTP_PORT: ${LISTEN_PORT:-80} + LISTEN_HTTPS_PORT: ${LISTEN_SSL_PORT} x-app-env: &app-env WEB_URL: ${WEB_URL:-http://localhost} diff --git a/deploy/selfhost/variables.env b/deploy/selfhost/variables.env index 63d4b10c6d3..53827e43c56 100644 --- a/deploy/selfhost/variables.env +++ b/deploy/selfhost/variables.env @@ -7,7 +7,8 @@ SPACE_REPLICAS=1 ADMIN_REPLICAS=1 API_REPLICAS=1 -NGINX_PORT=80 +LISTEN_PORT=80 +LISTEN_SSL_PORT=443 WEB_URL=http://${APP_DOMAIN} DEBUG=0 SENTRY_DSN= From 3d12305c6e0cff5c1a431cddf6957f54ec3afe46 Mon Sep 17 00:00:00 2001 From: Akshat Jain Date: Wed, 28 Aug 2024 15:27:20 +0530 Subject: [PATCH 05/19] Update variables.env --- deploy/selfhost/variables.env | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deploy/selfhost/variables.env b/deploy/selfhost/variables.env index 53827e43c56..1591586b771 100644 --- a/deploy/selfhost/variables.env +++ b/deploy/selfhost/variables.env @@ -31,7 +31,7 @@ REDIS_PORT=6379 REDIS_URL= # If SSL Cert to be generated, set CERT_EMAIL and APP_PROTOCOL to https -CERT_EMAIL=akshatjain9782@gmail.com +CERT_EMAIL=demo@example.com CERT_ACME_CA=https://acme-v02.api.letsencrypt.org/directory TRUSTED_PROXIES=0.0.0.0/0 From a6f8d140eea405143faf5086ef19b6e81ed4c0b5 Mon Sep 17 00:00:00 2001 From: Akshat Jain Date: Wed, 28 Aug 2024 13:57:34 +0530 Subject: [PATCH 06/19] fix: handling localhost as APP_DOMAIN --- caddy/caddy.sh | 9 ++++++++- deploy/selfhost/docker-compose.yml | 5 ++--- deploy/selfhost/variables.env | 5 +++-- 3 files changed, 13 insertions(+), 6 deletions(-) diff --git a/caddy/caddy.sh b/caddy/caddy.sh index 792d5a5dc30..0392a16c949 100644 --- a/caddy/caddy.sh +++ b/caddy/caddy.sh @@ -1,4 +1,11 @@ #!/bin/sh -export SITE_ADDRESS=$(if [ "$SSL" = "true" ]; then echo "${APP_DOMAIN}"; else echo "http://${APP_DOMAIN}"; fi) +if [ "$APP_DOMAIN" == "localhost" ]; then + export SITE_ADDRESS=":${LISTEN_HTTP_PORT}" +elif [ "$SSL" == "true" ]; then + export SITE_ADDRESS="${APP_DOMAIN}:${LISTEN_HTTPS_PORT}" +else + export SITE_ADDRESS="http://${APP_DOMAIN}:${LISTEN_HTTP_PORT}" +fi + exec caddy run --config /etc/caddy/Caddyfile diff --git a/deploy/selfhost/docker-compose.yml b/deploy/selfhost/docker-compose.yml index e4931c80eb0..32a379fa521 100644 --- a/deploy/selfhost/docker-compose.yml +++ b/deploy/selfhost/docker-compose.yml @@ -26,12 +26,11 @@ x-data-store-env: &data-store-env x-proxy-env: &proxy-env SSL: ${SSL:-false} APP_DOMAIN: ${APP_DOMAIN:-localhost} - NGINX_PORT: ${NGINX_PORT:-80} FILE_SIZE_LIMIT: ${FILE_SIZE_LIMIT:-5242880} CERT_EMAIL: ${CERT_EMAIL:-akshatjain9782@gmail.com} CERT_ACME_CA: ${CERT_ACME_CA:-} - LISTEN_HTTP_PORT: ${LISTEN_HTTP_PORT:-80} - LISTEN_HTTPS_PORT: ${LISTEN_HTTPS_PORT:-443} + LISTEN_HTTP_PORT: ${LISTEN_PORT:-80} + LISTEN_HTTPS_PORT: ${LISTEN_SSL_PORT} x-app-env: &app-env WEB_URL: ${WEB_URL:-http://localhost} diff --git a/deploy/selfhost/variables.env b/deploy/selfhost/variables.env index 63d4b10c6d3..1591586b771 100644 --- a/deploy/selfhost/variables.env +++ b/deploy/selfhost/variables.env @@ -7,7 +7,8 @@ SPACE_REPLICAS=1 ADMIN_REPLICAS=1 API_REPLICAS=1 -NGINX_PORT=80 +LISTEN_PORT=80 +LISTEN_SSL_PORT=443 WEB_URL=http://${APP_DOMAIN} DEBUG=0 SENTRY_DSN= @@ -30,7 +31,7 @@ REDIS_PORT=6379 REDIS_URL= # If SSL Cert to be generated, set CERT_EMAIL and APP_PROTOCOL to https -CERT_EMAIL=akshatjain9782@gmail.com +CERT_EMAIL=demo@example.com CERT_ACME_CA=https://acme-v02.api.letsencrypt.org/directory TRUSTED_PROXIES=0.0.0.0/0 From f02e67a2005725d4b12560642f356e298be66d9d Mon Sep 17 00:00:00 2001 From: Akshat Jain Date: Wed, 28 Aug 2024 16:22:14 +0530 Subject: [PATCH 07/19] fixed envs --- deploy/selfhost/variables.env | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deploy/selfhost/variables.env b/deploy/selfhost/variables.env index 1591586b771..c73753122a2 100644 --- a/deploy/selfhost/variables.env +++ b/deploy/selfhost/variables.env @@ -31,7 +31,7 @@ REDIS_PORT=6379 REDIS_URL= # If SSL Cert to be generated, set CERT_EMAIL and APP_PROTOCOL to https -CERT_EMAIL=demo@example.com +CERT_EMAIL= CERT_ACME_CA=https://acme-v02.api.letsencrypt.org/directory TRUSTED_PROXIES=0.0.0.0/0 From 83a6ba83b7f570092af9d15db946a124d23a19f8 Mon Sep 17 00:00:00 2001 From: Akshat Jain Date: Wed, 28 Aug 2024 16:47:45 +0530 Subject: [PATCH 08/19] fixed typo changes --- deploy/selfhost/docker-compose.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/deploy/selfhost/docker-compose.yml b/deploy/selfhost/docker-compose.yml index 32a379fa521..f1852355300 100644 --- a/deploy/selfhost/docker-compose.yml +++ b/deploy/selfhost/docker-compose.yml @@ -27,10 +27,10 @@ x-proxy-env: &proxy-env SSL: ${SSL:-false} APP_DOMAIN: ${APP_DOMAIN:-localhost} FILE_SIZE_LIMIT: ${FILE_SIZE_LIMIT:-5242880} - CERT_EMAIL: ${CERT_EMAIL:-akshatjain9782@gmail.com} + CERT_EMAIL: ${CERT_EMAIL} CERT_ACME_CA: ${CERT_ACME_CA:-} LISTEN_HTTP_PORT: ${LISTEN_PORT:-80} - LISTEN_HTTPS_PORT: ${LISTEN_SSL_PORT} + LISTEN_HTTPS_PORT: ${LISTEN_SSL_PORT:-443} x-app-env: &app-env WEB_URL: ${WEB_URL:-http://localhost} From 1968242c0dc12b0b1799e2d493acf53303b469b5 Mon Sep 17 00:00:00 2001 From: Manish Gupta Date: Thu, 29 Aug 2024 15:41:31 +0530 Subject: [PATCH 09/19] added release assets --- .github/workflows/build-branch.yml | 49 ++++++++++++++++++++++++++++++ deploy/selfhost/install.sh | 28 ++++++++++++++--- 2 files changed, 73 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build-branch.yml b/.github/workflows/build-branch.yml index 4d27af53f41..2d34d528a10 100644 --- a/.github/workflows/build-branch.yml +++ b/.github/workflows/build-branch.yml @@ -339,3 +339,52 @@ jobs: DOCKER_BUILDKIT: 1 DOCKER_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }} DOCKER_PASSWORD: ${{ secrets.DOCKERHUB_TOKEN }} + + publish_assets: + if : ${{ github.event_name == 'release' }} + runs-on: ubuntu-latest + needs: [branch_build_push_web, branch_build_push_admin, branch_build_push_space, branch_build_push_apiserver, branch_build_push_proxy] + steps: + - id: checkout_files + name: Checkout Files + uses: actions/checkout@v4 + + - name: Update shell script branch + run: | + sed -i "s/^RELEASE_TAG=.*/RELEASE_TAG=${{ github.event.release.tag_name }}/" ./deploy/selfhost/install.sh + sed -i "s/^export APP_RELEASE=.*/export APP_RELEASE=${{ github.event.release.tag_name }}/g" ./deploy/selfhost/install.sh + sed -i "s/APP_RELEASE=stable/APP_RELEASE=${{ github.event.release.tag_name }}/g" ./deploy/selfhost/install.sh + + sed -i "s/^APP_RELEASE=.*/APP_RELEASE=${{ github.event.release.tag_name }}/" ./deploy/selfhost/variables.env + + echo "Release Upload URL :::: ${{ github.event.release.upload_url }}" + + - name: Upload docker-compose.yaml + uses: actions/upload-release-asset@v1.0.1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ github.event.release.upload_url }} + asset_path: ./deploy/selfhost/docker-compose.yml + asset_name: docker-compose.yaml + asset_content_type: application/octet-stream + + - name: Upload variables.env + uses: actions/upload-release-asset@v1.0.1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ github.event.release.upload_url }} + asset_path: ./deploy/selfhost/variables.env + asset_name: variables.env + asset_content_type: application/octet-stream + + - name: Upload setup.sh + uses: actions/upload-release-asset@v1.0.1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ github.event.release.upload_url }} + asset_path: ./deploy/selfhost/install.sh + asset_name: setup.sh + asset_content_type: application/octet-stream diff --git a/deploy/selfhost/install.sh b/deploy/selfhost/install.sh index 6ad3b077fbe..adce24f96f9 100755 --- a/deploy/selfhost/install.sh +++ b/deploy/selfhost/install.sh @@ -1,6 +1,7 @@ #!/bin/bash BRANCH=${BRANCH:-master} +RELEASE_TAG="v0.22-dev" SCRIPT_DIR=$PWD SERVICE_FOLDER=plane-app PLANE_INSTALL_DIR=$PWD/$SERVICE_FOLDER @@ -166,11 +167,13 @@ function syncEnvFile(){ updateEnvFile "$key" "$value" "$DOCKER_ENV_PATH" fi done < "$DOCKER_ENV_PATH" + # Replace APP_RELEASE with the latest value + updateEnvFile "APP_RELEASE" "$APP_RELEASE" "$DOCKER_ENV_PATH" fi echo "Environment variables synced successfully" >&2 } -function buildYourOwnImage(){ +function buildYourOwnImage() { echo "Building images locally..." export DOCKERHUB_USER="myplane" @@ -232,8 +235,25 @@ function download() { mv $PLANE_INSTALL_DIR/docker-compose.yaml $PLANE_INSTALL_DIR/archive/$TS.docker-compose.yaml fi - curl -H 'Cache-Control: no-cache, no-store' -s -o $PLANE_INSTALL_DIR/docker-compose.yaml https://raw.githubusercontent.com/makeplane/plane/$BRANCH/deploy/selfhost/docker-compose.yml?$(date +%s) - curl -H 'Cache-Control: no-cache, no-store' -s -o $PLANE_INSTALL_DIR/variables-upgrade.env https://raw.githubusercontent.com/makeplane/plane/$BRANCH/deploy/selfhost/variables.env?$(date +%s) + curl -H 'Cache-Control: no-cache, no-store' -s -o $PLANE_INSTALL_DIR/docker-compose.yaml https://github.com/makeplane/plane/releases/download/$RELEASE_TAG/docker-compose.yaml?$(date +%s) + if [ $? -ne 0 ]; then + # 2nd attempt to download the file for backward compatibility + curl -H 'Cache-Control: no-cache, no-store' -s -o $PLANE_INSTALL_DIR/docker-compose.yaml https://raw.githubusercontent.com/makeplane/plane/$BRANCH/deploy/selfhost/docker-compose.yml?$(date +%s) + if [ $? -ne 0 ]; then + echo "Failed to download the docker-compose.yaml file. Exiting..." + exit 1 + fi + fi + + curl -H 'Cache-Control: no-cache, no-store' -s -o $PLANE_INSTALL_DIR/variables-upgrade.env https://github.com/makeplane/plane/releases/download/$RELEASE_TAG/variables.env?$(date +%s) + if [ $? -ne 0 ]; then + # 2nd attempt to download the file for backward compatibility + curl -H 'Cache-Control: no-cache, no-store' -s -o $PLANE_INSTALL_DIR/variables-upgrade.env https://raw.githubusercontent.com/makeplane/plane/$BRANCH/deploy/selfhost/variables.env?$(date +%s) + if [ $? -ne 0 ]; then + echo "Failed to download the variables.env file. Exiting..." + exit 1 + fi + fi if [ -f "$DOCKER_ENV_PATH" ]; then @@ -339,7 +359,7 @@ function upgrade() { stopServices echo - echo "***** DOWNLOADING STABLE VERSION ****" + echo "***** DOWNLOADING $APP_RELEASE VERSION ****" install echo "***** PLEASE VALIDATE AND START SERVICES ****" From 78edbc8dd62c665890d09f742429311e9d038d64 Mon Sep 17 00:00:00 2001 From: Manish Gupta Date: Thu, 29 Aug 2024 16:00:00 +0530 Subject: [PATCH 10/19] updated build.yml --- deploy/selfhost/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deploy/selfhost/build.yml b/deploy/selfhost/build.yml index b65d297e9fd..7c0ac67e84c 100644 --- a/deploy/selfhost/build.yml +++ b/deploy/selfhost/build.yml @@ -26,5 +26,5 @@ services: proxy: image: ${DOCKERHUB_USER:-local}/plane-proxy:${APP_RELEASE:-latest} build: - context: ./nginx + context: ./caddy dockerfile: ./Dockerfile From c8c7d4384d14aea8f4fc9f26da85b766ca18db54 Mon Sep 17 00:00:00 2001 From: Manish Gupta Date: Thu, 29 Aug 2024 19:02:07 +0530 Subject: [PATCH 11/19] update install.sh --- deploy/selfhost/install.sh | 2 +- plane-enterprise-1.0.7.tgz | Bin 0 -> 12103 bytes 2 files changed, 1 insertion(+), 1 deletion(-) create mode 100644 plane-enterprise-1.0.7.tgz diff --git a/deploy/selfhost/install.sh b/deploy/selfhost/install.sh index adce24f96f9..9e8c1ff06b0 100755 --- a/deploy/selfhost/install.sh +++ b/deploy/selfhost/install.sh @@ -1,7 +1,7 @@ #!/bin/bash BRANCH=${BRANCH:-master} -RELEASE_TAG="v0.22-dev" +RELEASE_TAG=${RELEASE_TAG:-v0.22-dev} SCRIPT_DIR=$PWD SERVICE_FOLDER=plane-app PLANE_INSTALL_DIR=$PWD/$SERVICE_FOLDER diff --git a/plane-enterprise-1.0.7.tgz b/plane-enterprise-1.0.7.tgz new file mode 100644 index 0000000000000000000000000000000000000000..5f4a1cbb65773d48a585dc84d03de7b5ffcdb92c GIT binary patch literal 12103 zcm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qE;58Swzm7$opcZhE)ygQKYC{L~9}j%gb6#lnl9A zPTAF^l*<}*Gl7<&fkyzTlpiHni!f!T>9XK^WJx+7OvP$O8DI`Rw%|Y|dQSFYvp)Hp zz-X2%ho(?)r~p*CYdvB8mIan7x>JDVQr=!2aKHJgc4L9m>9$mR7}IzjDon`EpqrBDd#OwtloA75^U z7mi3|oqqY*M{#>Tm0!#YdZ2_UJI#=R&}6mACsT~JslhUN79bC4S#DcyYVu5Uc#z8!kKlK@ghWsHqtPVI2tLe`)$=bSU zXIfWtm^bg|VPj^~(%R3nlbiMCd(yQzGZ&v<_>@bp|~R2SGbp_e!58pEA^Na0O>o%55) xWOipJrG=uMTW#f4XZ8qE1}d=7I<0Vht*`a9zE*hs{{R30|Nqrui}wIZ0RTg=(K!GB literal 0 HcmV?d00001 From 7b1df8ffdd98c8cca2505c74f8bf9754d0e87183 Mon Sep 17 00:00:00 2001 From: Manish Gupta Date: Tue, 3 Sep 2024 10:46:24 +0530 Subject: [PATCH 12/19] updated selfhost README --- .github/workflows/build-branch.yml | 10 ++++++++++ deploy/selfhost/README.md | 32 ++++++++++++++++++++++-------- deploy/selfhost/variables.env | 2 +- 3 files changed, 35 insertions(+), 9 deletions(-) diff --git a/.github/workflows/build-branch.yml b/.github/workflows/build-branch.yml index 2d34d528a10..34941eb7239 100644 --- a/.github/workflows/build-branch.yml +++ b/.github/workflows/build-branch.yml @@ -388,3 +388,13 @@ jobs: asset_path: ./deploy/selfhost/install.sh asset_name: setup.sh asset_content_type: application/octet-stream + + - name: Upload restore.sh + uses: actions/upload-release-asset@v1.0.1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ github.event.release.upload_url }} + asset_path: ./deploy/selfhost/restore.sh + asset_name: restore.sh + asset_content_type: application/octet-stream diff --git a/deploy/selfhost/README.md b/deploy/selfhost/README.md index d93d85ca14d..315e4d5abe9 100644 --- a/deploy/selfhost/README.md +++ b/deploy/selfhost/README.md @@ -55,14 +55,14 @@ Installing plane is a very easy and minimal step process. - User context used must have access to docker services. In most cases, use sudo su to switch as root user - Use the terminal (or gitbash) window to run all the future steps -### Downloading Latest Stable Release +### Downloading Latest Release ``` -mkdir plane-selfhost +mkdir -p plane-selfhost && cd plane-selfhost -cd plane-selfhost +RELEASE_VERSION= -curl -fsSL -o setup.sh https://raw.githubusercontent.com/makeplane/plane/master/deploy/selfhost/install.sh +curl -fsSL -o setup.sh https://github.com/makeplane/plane/releases/download/${RELEASE_VERSION}/setup.sh chmod +x setup.sh ``` @@ -106,11 +106,15 @@ Again the `options [1-8]` will be popped up and this time hit `8` to exit. Before proceeding, we suggest used to review `.env` file and set the values. Below are the most import keys you must refer to. _You can use any text editor to edit this file_. -> `NGINX_PORT` - This is default set to `80`. Make sure the port you choose to use is not preoccupied. (e.g `NGINX_PORT=8080`) +> `APP_DOMAIN` - Set the Fully Qualified Domain Name here. (eg. `plane.example.com`) -> `WEB_URL` - This is default set to `http://localhost`. Change this to the FQDN you plan to use along with NGINX_PORT (eg. `https://plane.example.com:8080` or `http://[IP-ADDRESS]:8080`) +> `LISTEN_PORT` - This is default set to `80`. Make sure the port you choose to use is not preoccupied. (e.g `LISTEN_PORT=8080`) -> `CORS_ALLOWED_ORIGINS` - This is default set to `http://localhost`. Change this to the FQDN you plan to use along with NGINX_PORT (eg. `https://plane.example.com:8080` or `http://[IP-ADDRESS]:8080`) +> `LISTEN_SSL_PORT` - This is default set to `443`. Make sure the port you choose to use is not preoccupied. (e.g `LISTEN_SSL_PORT=8443`) + +> `WEB_URL` - This is default set to `http://localhost`. Change this to the FQDN you plan to use along with LISTEN_PORT/LISTEN_SSL_PORT (eg. `https://plane.example.com:8443` or `http://[IP-ADDRESS]:8080`) + +> `CORS_ALLOWED_ORIGINS` - This is default set to `http://${APP_DOMAIN},https://${APP_DOMAIN}`. Change this to the FQDN you plan to use along with LISTEN_PORT and LISTEN_SSL_PORT (eg. `http://plane.example.com:8080,https://plane.example.com:8443`) There are many other settings you can play with, but we suggest you configure `EMAIL SETTINGS` as it will enable you to invite your teammates onto the platform. @@ -134,6 +138,8 @@ Select a Action you want to perform: Action [2]: 2 ``` +> You can also choose to run `./setup.sh start` as direct command. + Expect something like this. ![Downloading docker images](images/download.png) @@ -167,6 +173,8 @@ Select a Action you want to perform: Action [2]: 3 ``` +> You can also choose to run `./setup.sh stop` as direct command. + If all goes well, you must see something like this ![Stop Services](images/stopped.png) @@ -193,6 +201,8 @@ Select a Action you want to perform: Action [2]: 4 ``` +> You can also choose to run `./setup.sh restart` as direct command. + If all goes well, you must see something like this ![Restart Services](images/restart.png) @@ -219,6 +229,8 @@ Select a Action you want to perform: Action [2]: 5 ``` +> You can also choose to run `./setup.sh upgrade` as direct command. + By choosing this, it will stop the services and then will download the latest `docker-compose.yaml` and `plane.env`. You must expect the below message @@ -253,6 +265,7 @@ Select a Action you want to perform: Action [2]: 6 ``` +> You can also choose to run `./setup.sh logs` as direct command. This will further open sub-menu with list of services ```bash @@ -343,6 +356,8 @@ Select a Action you want to perform: Action [2]: 7 ``` +> You can also choose to run `./setup.sh backup` as direct command. + In response, you can find the backup folder ```bash @@ -364,7 +379,8 @@ When you want to restore the previously backed-up data, follow the instructions 1. Download the restore script using the command below. We suggest downloading it in the same folder as `setup.sh`. ```bash - curl -fsSL -o restore.sh https://raw.githubusercontent.com/makeplane/plane/master/deploy/selfhost/restore.sh + RELEASE_VERSION= + curl -fsSL -o restore.sh https://github.com/makeplane/plane/releases/download/${RELEASE_VERSION}/restore.sh chmod +x restore.sh ``` diff --git a/deploy/selfhost/variables.env b/deploy/selfhost/variables.env index c73753122a2..31d0607373f 100644 --- a/deploy/selfhost/variables.env +++ b/deploy/selfhost/variables.env @@ -13,7 +13,7 @@ WEB_URL=http://${APP_DOMAIN} DEBUG=0 SENTRY_DSN= SENTRY_ENVIRONMENT=production -CORS_ALLOWED_ORIGINS=http://${APP_DOMAIN} +CORS_ALLOWED_ORIGINS=http://${APP_DOMAIN},https://${APP_DOMAIN} #DB SETTINGS PGHOST=plane-db From ee50529f55962df11cd6df9752161e48cfcddcc5 Mon Sep 17 00:00:00 2001 From: Manish Gupta Date: Tue, 3 Sep 2024 10:50:00 +0530 Subject: [PATCH 13/19] Update selfhost README --- deploy/selfhost/README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/deploy/selfhost/README.md b/deploy/selfhost/README.md index 315e4d5abe9..4322c146ded 100644 --- a/deploy/selfhost/README.md +++ b/deploy/selfhost/README.md @@ -107,13 +107,13 @@ Before proceeding, we suggest used to review `.env` file and set the values. Below are the most import keys you must refer to. _You can use any text editor to edit this file_. > `APP_DOMAIN` - Set the Fully Qualified Domain Name here. (eg. `plane.example.com`) - +> > `LISTEN_PORT` - This is default set to `80`. Make sure the port you choose to use is not preoccupied. (e.g `LISTEN_PORT=8080`) - +> > `LISTEN_SSL_PORT` - This is default set to `443`. Make sure the port you choose to use is not preoccupied. (e.g `LISTEN_SSL_PORT=8443`) - +> > `WEB_URL` - This is default set to `http://localhost`. Change this to the FQDN you plan to use along with LISTEN_PORT/LISTEN_SSL_PORT (eg. `https://plane.example.com:8443` or `http://[IP-ADDRESS]:8080`) - +> > `CORS_ALLOWED_ORIGINS` - This is default set to `http://${APP_DOMAIN},https://${APP_DOMAIN}`. Change this to the FQDN you plan to use along with LISTEN_PORT and LISTEN_SSL_PORT (eg. `http://plane.example.com:8080,https://plane.example.com:8443`) There are many other settings you can play with, but we suggest you configure `EMAIL SETTINGS` as it will enable you to invite your teammates onto the platform. From bae525eb290f80c8c2dd93fb2b97b8cb99c68046 Mon Sep 17 00:00:00 2001 From: Manish Gupta Date: Tue, 3 Sep 2024 12:56:43 +0530 Subject: [PATCH 14/19] selfhost fix for live --- deploy/selfhost/docker-compose.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deploy/selfhost/docker-compose.yml b/deploy/selfhost/docker-compose.yml index e21cded4448..045df9fb3c9 100644 --- a/deploy/selfhost/docker-compose.yml +++ b/deploy/selfhost/docker-compose.yml @@ -104,7 +104,7 @@ services: restart: unless-stopped command: node live/dist/server.js live environment: - <<: [ *live-env ] + <<: [ *live-env, *redis-env ] deploy: replicas: ${LIVE_REPLICAS:-1} depends_on: From 085fc16402b66c6ca1d4604c237dea0cc37dd860 Mon Sep 17 00:00:00 2001 From: Manish Gupta Date: Tue, 3 Sep 2024 13:04:06 +0530 Subject: [PATCH 15/19] AIO updates for LIVE --- aio/Dockerfile-app | 8 ++++++-- aio/nginx.conf | 8 ++++++++ aio/supervisord-app | 10 ++++++++++ 3 files changed, 24 insertions(+), 2 deletions(-) diff --git a/aio/Dockerfile-app b/aio/Dockerfile-app index 54b5269e348..74692ef7298 100644 --- a/aio/Dockerfile-app +++ b/aio/Dockerfile-app @@ -11,7 +11,7 @@ WORKDIR /app RUN yarn global add turbo COPY . . -RUN turbo prune --scope=web --scope=space --scope=admin --docker +RUN turbo prune --scope=web --scope=space --scope=admin --scope=live --docker # ***************************************************************************** # STAGE 2: Install dependencies & build the project @@ -53,7 +53,7 @@ ENV NEXT_PUBLIC_WEB_BASE_URL=$NEXT_PUBLIC_WEB_BASE_URL ENV NEXT_TELEMETRY_DISABLED=1 ENV TURBO_TELEMETRY_DISABLED=1 -RUN yarn turbo run build --filter=web --filter=space --filter=admin +RUN yarn turbo run build --filter=web --filter=space --filter=admin --filter=live # ***************************************************************************** # STAGE 3: Copy the project and start it @@ -105,6 +105,10 @@ COPY --from=installer /app/admin/.next/standalone ./admin COPY --from=installer /app/admin/.next/static ./admin/admin/.next/static COPY --from=installer /app/admin/public ./admin/admin/public +COPY --from=installer /app/live/package.json ./live/ +COPY --from=installer /app/live/dist ./live/dist +COPY --from=installer /app/live/node_modules ./live/node_modules + ARG NEXT_PUBLIC_API_BASE_URL="" ENV NEXT_PUBLIC_API_BASE_URL=$NEXT_PUBLIC_API_BASE_URL diff --git a/aio/nginx.conf b/aio/nginx.conf index 78ae00d28ce..8093b9fb8ca 100644 --- a/aio/nginx.conf +++ b/aio/nginx.conf @@ -45,6 +45,14 @@ http { proxy_pass http://localhost:3003/god-mode/; } + location /live/ { + proxy_http_version 1.1; + proxy_set_header Upgrade ${dollar}http_upgrade; + proxy_set_header Connection "upgrade"; + proxy_set_header Host ${dollar}http_host; + proxy_pass http://localhost:3004/; + } + location /api/ { proxy_http_version 1.1; proxy_set_header Upgrade ${dollar}http_upgrade; diff --git a/aio/supervisord-app b/aio/supervisord-app index e2cf1f04754..ae0d540dd4e 100644 --- a/aio/supervisord-app +++ b/aio/supervisord-app @@ -29,6 +29,16 @@ stderr_logfile=/dev/stdout stderr_logfile_maxbytes=0 environment=PORT=3003,HOSTNAME=0.0.0.0 +[program:live] +command=node /app/live/dist/server.js +autostart=true +autorestart=true +stdout_logfile=/dev/stdout +stdout_logfile_maxbytes=0 +stderr_logfile=/dev/stdout +stderr_logfile_maxbytes=0 +environment=PORT=3004,HOSTNAME=0.0.0.0,API_BASE_URL="http://localhost:8000" + [program:migrator] directory=/app/api command=sh -c "./bin/docker-entrypoint-migrator.sh" From 7d4ec00f918d01c57cea88a2f991ae27f5490163 Mon Sep 17 00:00:00 2001 From: Manish Gupta Date: Tue, 3 Sep 2024 15:51:02 +0530 Subject: [PATCH 16/19] updated AIP --- aio/Dockerfile-app | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/aio/Dockerfile-app b/aio/Dockerfile-app index 74692ef7298..502980ba967 100644 --- a/aio/Dockerfile-app +++ b/aio/Dockerfile-app @@ -87,6 +87,8 @@ RUN chmod +x ./api/bin/* RUN chmod -R 777 ./api/ # NEXTJS BUILDS +COPY --from=installer /app/node_modules ./node_modules/ + COPY --from=installer /app/web/next.config.js ./web/ COPY --from=installer /app/web/package.json ./web/ COPY --from=installer /app/web/.next/standalone ./web @@ -107,7 +109,7 @@ COPY --from=installer /app/admin/public ./admin/admin/public COPY --from=installer /app/live/package.json ./live/ COPY --from=installer /app/live/dist ./live/dist -COPY --from=installer /app/live/node_modules ./live/node_modules +# COPY --from=installer /app/live/node_modules ./live/node_modules ARG NEXT_PUBLIC_API_BASE_URL="" ENV NEXT_PUBLIC_API_BASE_URL=$NEXT_PUBLIC_API_BASE_URL From 54a83ef5a18056f1625eae14f7e3464f7f2f4663 Mon Sep 17 00:00:00 2001 From: Akshat Jain Date: Fri, 6 Sep 2024 12:27:51 +0530 Subject: [PATCH 17/19] add default value for CERT_EMAIL --- deploy/selfhost/docker-compose.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deploy/selfhost/docker-compose.yml b/deploy/selfhost/docker-compose.yml index 045df9fb3c9..f0e7763a32c 100644 --- a/deploy/selfhost/docker-compose.yml +++ b/deploy/selfhost/docker-compose.yml @@ -32,7 +32,7 @@ x-proxy-env: &proxy-env SSL: ${SSL:-false} APP_DOMAIN: ${APP_DOMAIN:-localhost} FILE_SIZE_LIMIT: ${FILE_SIZE_LIMIT:-5242880} - CERT_EMAIL: ${CERT_EMAIL} + CERT_EMAIL: ${CERT_EMAIL:-admin@example.com} CERT_ACME_CA: ${CERT_ACME_CA:-} LISTEN_HTTP_PORT: ${LISTEN_PORT:-80} LISTEN_HTTPS_PORT: ${LISTEN_SSL_PORT:-443} From 5184ce608beafc594e0a09fdb9e44aca8f1f54eb Mon Sep 17 00:00:00 2001 From: Manish Gupta Date: Tue, 10 Sep 2024 12:44:31 +0530 Subject: [PATCH 18/19] updated branch-build --- .github/workflows/build-branch.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-branch.yml b/.github/workflows/build-branch.yml index 7143581380c..f72fb064d47 100644 --- a/.github/workflows/build-branch.yml +++ b/.github/workflows/build-branch.yml @@ -403,7 +403,7 @@ jobs: publish_assets: if : ${{ github.event_name == 'release' }} runs-on: ubuntu-latest - needs: [branch_build_push_web, branch_build_push_admin, branch_build_push_space, branch_build_push_apiserver, branch_build_push_proxy] + needs: [branch_build_push_web, branch_build_push_admin, branch_build_push_space, branch_build_push_apiserver, branch_build_push_proxy, branch_build_push_live] steps: - id: checkout_files name: Checkout Files From c5e5b99ee78689288be685ad911c8d369ef5f17f Mon Sep 17 00:00:00 2001 From: Manish Gupta Date: Tue, 10 Sep 2024 13:45:00 +0530 Subject: [PATCH 19/19] updated install.sh to not use release assets --- deploy/selfhost/install.sh | 20 ++++++-------------- 1 file changed, 6 insertions(+), 14 deletions(-) diff --git a/deploy/selfhost/install.sh b/deploy/selfhost/install.sh index 9e8c1ff06b0..766557cf2bd 100755 --- a/deploy/selfhost/install.sh +++ b/deploy/selfhost/install.sh @@ -235,24 +235,16 @@ function download() { mv $PLANE_INSTALL_DIR/docker-compose.yaml $PLANE_INSTALL_DIR/archive/$TS.docker-compose.yaml fi - curl -H 'Cache-Control: no-cache, no-store' -s -o $PLANE_INSTALL_DIR/docker-compose.yaml https://github.com/makeplane/plane/releases/download/$RELEASE_TAG/docker-compose.yaml?$(date +%s) + curl -H 'Cache-Control: no-cache, no-store' -s -o $PLANE_INSTALL_DIR/docker-compose.yaml https://raw.githubusercontent.com/makeplane/plane/$BRANCH/deploy/selfhost/docker-compose.yml?$(date +%s) if [ $? -ne 0 ]; then - # 2nd attempt to download the file for backward compatibility - curl -H 'Cache-Control: no-cache, no-store' -s -o $PLANE_INSTALL_DIR/docker-compose.yaml https://raw.githubusercontent.com/makeplane/plane/$BRANCH/deploy/selfhost/docker-compose.yml?$(date +%s) - if [ $? -ne 0 ]; then - echo "Failed to download the docker-compose.yaml file. Exiting..." - exit 1 - fi + echo "Failed to download the docker-compose.yaml file. Exiting..." + exit 1 fi - curl -H 'Cache-Control: no-cache, no-store' -s -o $PLANE_INSTALL_DIR/variables-upgrade.env https://github.com/makeplane/plane/releases/download/$RELEASE_TAG/variables.env?$(date +%s) + curl -H 'Cache-Control: no-cache, no-store' -s -o $PLANE_INSTALL_DIR/variables-upgrade.env https://raw.githubusercontent.com/makeplane/plane/$BRANCH/deploy/selfhost/variables.env?$(date +%s) if [ $? -ne 0 ]; then - # 2nd attempt to download the file for backward compatibility - curl -H 'Cache-Control: no-cache, no-store' -s -o $PLANE_INSTALL_DIR/variables-upgrade.env https://raw.githubusercontent.com/makeplane/plane/$BRANCH/deploy/selfhost/variables.env?$(date +%s) - if [ $? -ne 0 ]; then - echo "Failed to download the variables.env file. Exiting..." - exit 1 - fi + echo "Failed to download the variables.env file. Exiting..." + exit 1 fi if [ -f "$DOCKER_ENV_PATH" ];