From 16c78100c08706a02e5f852904da5b6dc9157653 Mon Sep 17 00:00:00 2001 From: pablohashescobar Date: Thu, 8 Feb 2024 13:22:20 +0530 Subject: [PATCH] dev: docker variables upgrade and nginx template update --- deploy/selfhost/variables.env | 46 +++++++++++++++++++---------------- nginx/nginx.conf.dev | 10 +++++--- nginx/nginx.conf.template | 9 ++++--- 3 files changed, 36 insertions(+), 29 deletions(-) diff --git a/deploy/selfhost/variables.env b/deploy/selfhost/variables.env index 4a3781811..c92d30e59 100644 --- a/deploy/selfhost/variables.env +++ b/deploy/selfhost/variables.env @@ -8,13 +8,14 @@ NGINX_PORT=80 WEB_URL=http://localhost DEBUG=0 NEXT_PUBLIC_DEPLOY_URL=http://localhost/spaces -SENTRY_DSN="" -SENTRY_ENVIRONMENT="production" -GOOGLE_CLIENT_ID="" -GITHUB_CLIENT_ID="" -GITHUB_CLIENT_SECRET="" -DOCKERIZED=1 # deprecated -CORS_ALLOWED_ORIGINS="http://localhost" +SENTRY_DSN= +SENTRY_ENVIRONMENT=production +GOOGLE_CLIENT_ID= +GITHUB_CLIENT_ID= +GITHUB_CLIENT_SECRET= +# deprecated +DOCKERIZED=1 +CORS_ALLOWED_ORIGINS=http://localhost #DB SETTINGS PGHOST=plane-db @@ -23,26 +24,29 @@ POSTGRES_USER=plane POSTGRES_PASSWORD=plane POSTGRES_DB=plane PGDATA=/var/lib/postgresql/data -DATABASE_URL=postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@${PGHOST}/${PGDATABASE} +DATABASE_URL= # REDIS SETTINGS REDIS_HOST=plane-redis REDIS_PORT=6379 -REDIS_URL=redis://${REDIS_HOST}:6379/ +REDIS_URL= # EMAIL SETTINGS -EMAIL_HOST="" -EMAIL_HOST_USER="" -EMAIL_HOST_PASSWORD="" +EMAIL_HOST= +EMAIL_HOST_USER= +EMAIL_HOST_PASSWORD= EMAIL_PORT=587 -EMAIL_FROM="Team Plane " +EMAIL_FROM=Team Plane EMAIL_USE_TLS=1 EMAIL_USE_SSL=0 # OPENAI SETTINGS -OPENAI_API_BASE=https://api.openai.com/v1 # deprecated -OPENAI_API_KEY="sk-" # deprecated -GPT_ENGINE="gpt-3.5-turbo" # deprecated +# deprecated +OPENAI_API_BASE=https://api.openai.com/v1 +# deprecated +OPENAI_API_KEY=sk- +# deprecated +GPT_ENGINE=gpt-3.5-turbo # LOGIN/SIGNUP SETTINGS ENABLE_SIGNUP=1 @@ -52,13 +56,13 @@ SECRET_KEY=60gp0byfz2dvffa45cxl20p1scy9xbpf6d8c5y0geejgkyp1b5 # DATA STORE SETTINGS USE_MINIO=1 -AWS_REGION="" -AWS_ACCESS_KEY_ID="access-key" -AWS_SECRET_ACCESS_KEY="secret-key" +AWS_REGION= +AWS_ACCESS_KEY_ID=access-key +AWS_SECRET_ACCESS_KEY=secret-key AWS_S3_ENDPOINT_URL=http://plane-minio:9000 AWS_S3_BUCKET_NAME=uploads -MINIO_ROOT_USER="access-key" -MINIO_ROOT_PASSWORD="secret-key" +MINIO_ROOT_USER=access-key +MINIO_ROOT_PASSWORD=secret-key BUCKET_NAME=uploads FILE_SIZE_LIMIT=5242880 diff --git a/nginx/nginx.conf.dev b/nginx/nginx.conf.dev index 07501e729..27179e7ce 100644 --- a/nginx/nginx.conf.dev +++ b/nginx/nginx.conf.dev @@ -16,6 +16,12 @@ http { add_header Permissions-Policy "interest-cohort=()" always; add_header Strict-Transport-Security "max-age=31536000; includeSubDomains" always; + add_header Host ${dollar}host; + add_header X-Real-IP ${dollar}remote_addr; + add_header X-Forwarded-For ${dollar}proxy_add_x_forwarded_for; + add_header X-Forwarded-Proto ${dollar}scheme; + + location / { proxy_pass http://web:3000/; proxy_http_version 1.1; @@ -24,10 +30,6 @@ http { } location /api/ { - proxy_set_header Host ${dollar}host; - proxy_set_header X-Real-IP ${dollar}remote_addr; - proxy_set_header X-Forwarded-For ${dollar}proxy_add_x_forwarded_for; - proxy_set_header X-Forwarded-Proto ${dollar}scheme; proxy_pass http://api:8000/api/; } diff --git a/nginx/nginx.conf.template b/nginx/nginx.conf.template index c66cbc068..8edef295f 100644 --- a/nginx/nginx.conf.template +++ b/nginx/nginx.conf.template @@ -16,15 +16,16 @@ http { add_header Permissions-Policy "interest-cohort=()" always; add_header Strict-Transport-Security "max-age=31536000; includeSubDomains" always; + add_header Host ${dollar}host; + add_header X-Real-IP ${dollar}remote_addr; + add_header X-Forwarded-For ${dollar}proxy_add_x_forwarded_for; + add_header X-Forwarded-Proto ${dollar}scheme; + location / { proxy_pass http://web:3000/; } location /api/ { - proxy_set_header Host ${dollar}host; - proxy_set_header X-Real-IP ${dollar}remote_addr; - proxy_set_header X-Forwarded-For ${dollar}proxy_add_x_forwarded_for; - proxy_set_header X-Forwarded-Proto ${dollar}scheme; proxy_pass http://api:8000/api/; }