diff --git a/project/backend/README.md b/project/backend/README.md index 8466ed1e..6e0e3c90 100644 --- a/project/backend/README.md +++ b/project/backend/README.md @@ -11,7 +11,7 @@ Please be sure your database server is running before run the container. You can To run the container, - `docker run -p 8000:8000 ` - + The first port number (8000) is the port number of your machine your service runs. Please be sure that the specified port is available. The second one is your container's port number and should be same as the one exported in the Dockerfile. (8000 for this project.) Dont forget to set the following environment variables, @@ -21,6 +21,9 @@ Dont forget to set the following environment variables, - DATABASE_PASSWORD: should be the password of the owner of the created database, for root user: postgres - DATABASE_HOST: should be the address of your database server, in local: 127.0.0.1 - DATABASE_PORT: should be the port number of your database server, default: 5432 +- EMAIL_HOST_USER: should be a real gmail email address, this is for sending user's email notifications +- EMAIL_HOST_PASSWORD: should be the password of the gmail email address used as EMAIL_HOST_USER +- ADMIN_EMAIL: should be the same as EMAIL_HOST_USER You can set them while running the container like the following - `docker run -p 8000:8000 -e DJANGO_SECRET_KEY= ` diff --git a/project/backend/backend/settings.py b/project/backend/backend/settings.py index f81b6193..5bbaef34 100644 --- a/project/backend/backend/settings.py +++ b/project/backend/backend/settings.py @@ -80,10 +80,10 @@ EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend' EMAIL_HOST = 'smtp.gmail.com' EMAIL_PORT = 587 -EMAIL_HOST_USER = 'sciencecollabplatform@gmail.com' -EMAIL_HOST_PASSWORD = os.environ.get('EMAIL_PASSWORD') +EMAIL_HOST_USER = os.environ.get('EMAIL_HOST_USER') +EMAIL_HOST_PASSWORD = os.environ.get('EMAIL_HOST_PASSWORD') EMAIL_USE_TLS = True -ADMIN_EMAIL='sciencecollabplatform@gmail.com' +ADMIN_EMAIL = os.environ.get('ADMIN_EMAIL') EMAIL_USE_SSL = False # Database # https://docs.djangoproject.com/en/4.2/ref/settings/#databases