chore: added DEBUG value for docker setup (#1327)

* chore: add DEBUG value for docker setup

* refactor: removed the extra DEFAULT value
This commit is contained in:
Bavisetti Narayan 2023-06-20 09:36:08 +05:30 committed by GitHub
parent f2ebac1bb4
commit 0c3635cf25
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 17 additions and 3 deletions

View File

@ -22,6 +22,9 @@ NEXT_PUBLIC_SLACK_CLIENT_ID=""
# Backend
# Debug value for api server use it as 0 for production use
DEBUG=0
# Database Settings
PGUSER="plane"
PGPASSWORD="plane"

View File

@ -10,7 +10,9 @@ from sentry_sdk.integrations.redis import RedisIntegration
from .common import * # noqa
DEBUG = True
DEBUG = int(os.environ.get(
"DEBUG", 1
)) == 1
EMAIL_BACKEND = "django.core.mail.backends.console.EmailBackend"

View File

@ -13,7 +13,10 @@ from sentry_sdk.integrations.redis import RedisIntegration
from .common import * # noqa
# Database
DEBUG = False
DEBUG = int(os.environ.get(
"DEBUG", 0
)) == 1
DATABASES = {
"default": {
"ENGINE": "django.db.backends.postgresql_psycopg2",

View File

@ -12,7 +12,9 @@ from sentry_sdk.integrations.redis import RedisIntegration
from .common import * # noqa
# Database
DEBUG = True
DEBUG = int(os.environ.get(
"DEBUG", 1
)) == 1
DATABASES = {
"default": {
"ENGINE": "django.db.backends.postgresql_psycopg2",

View File

@ -52,6 +52,7 @@ services:
DEFAULT_EMAIL: ${DEFAULT_EMAIL}
DEFAULT_PASSWORD: ${DEFAULT_PASSWORD}
USE_MINIO: ${USE_MINIO}
DEBUG: ${DEBUG}
depends_on:
- plane-db
- plane-redis
@ -88,6 +89,7 @@ services:
DEFAULT_EMAIL: ${DEFAULT_EMAIL}
DEFAULT_PASSWORD: ${DEFAULT_PASSWORD}
USE_MINIO: ${USE_MINIO}
DEBUG: ${DEBUG}
depends_on:
- plane-api
- plane-db

View File

@ -37,6 +37,7 @@ services:
env_file:
- .env
environment:
DEBUG: ${DEBUG}
DJANGO_SETTINGS_MODULE: plane.settings.production
DATABASE_URL: postgres://${PGUSER}:${PGPASSWORD}@${PGHOST}:5432/${PGDATABASE}
REDIS_URL: redis://plane-redis:6379/
@ -78,6 +79,7 @@ services:
env_file:
- .env
environment:
DEBUG: ${DEBUG}
DJANGO_SETTINGS_MODULE: plane.settings.production
DATABASE_URL: postgres://${PGUSER}:${PGPASSWORD}@${PGHOST}:5432/${PGDATABASE}
REDIS_URL: redis://plane-redis:6379/