Fakultas Ilmu Komputer UI

Commit 744db13d authored by Faisal Hanif's avatar Faisal Hanif
Browse files

Merge branch 'faisal/send-password-reset-email-coldfix' into 'staging'

Fix email configuration

See merge request !45
parents bd8fd302 6830872f
Pipeline #88622 failed with stage
in 13 seconds
......@@ -22,7 +22,7 @@ ACTIVITY_TYPE_CREATE = "Create"
ACTIVITY_TYPE_EDIT = "Edit"
ACTIVITY_TYPE_DELETE = "Delete"
EMAIL_ACCOUNT_ACTIVATION_SENDER = "tbcare.ppl@gmail.com"
EMAIL_ACCOUNT_ACTIVATION_SENDER = "tbcare.ppl@cs.ui.ac.id"
EMAIL_ACCOUNT_ACTIVATION_SUBJECT = "TBCare - Aktivasi Akun Berhasil"
EMAIL_ACCOUNT_ACTIVATION_CONTENT = """Halo {name},
......@@ -30,7 +30,7 @@ EMAIL_ACCOUNT_ACTIVATION_CONTENT = """Halo {name},
Silahkan buka aplikasi TBCare dan log in menggunakan email dan password yang Anda daftarkan.
"""
EMAIL_ACCOUNT_DEACTIVATION_SENDER = "tbcare.ppl@gmail.com"
EMAIL_ACCOUNT_DEACTIVATION_SENDER = "tbcare.ppl@cs.ui.ac.id"
EMAIL_ACCOUNT_DEACTIVATION_SUBJECT = "TBCare - Akun Non-aktif"
EMAIL_ACCOUNT_DEACTIVATION_CONTENT = """Halo {name},
......@@ -38,7 +38,7 @@ EMAIL_ACCOUNT_DEACTIVATION_CONTENT = """Halo {name},
Silahkan kontak pengurus jika Anda merasa tidak menon-aktifkan akun Anda.
"""
EMAIL_PASSWORD_RESET_SENDER = "tbcare.ppl@gmail.com"
EMAIL_PASSWORD_RESET_SENDER = "tbcare.ppl@cs.ui.ac.id"
EMAIL_PASSWORD_RESET_SUBJECT = "TBCare - Password Diubah"
EMAIL_PASSWORD_RESET_CONTENT = """Halo {name},
......
......@@ -20,6 +20,8 @@ services:
- db
networks:
- backend
extra_hosts:
- host.docker.internal:host-gateway
volumes:
- staticfiles:/srv/staticfiles
environment:
......@@ -46,7 +48,7 @@ services:
- POSTGRES_DB=${DATABASE_NAME}
- POSTGRES_USER=${DATABASE_USER}
- POSTGRES_PASSWORD=${DATABASE_PASSWORD}
locust:
image: tbcare/locust:development
networks:
......@@ -54,7 +56,7 @@ services:
volumes:
- ./monitoring/locust:/mnt/locust
command: -f /mnt/locust/locust.py -H http://nginx:80
locust-exporter:
image: containersol/locust_exporter
networks:
......@@ -63,7 +65,7 @@ services:
- LOCUST_EXPORTER_URI=http://locust:8089
depends_on:
- locust
prometheus:
image: prom/prometheus
networks:
......@@ -72,7 +74,7 @@ services:
- ./monitoring/prometheus:/etc/prometheus
depends_on:
- locust-exporter
grafana:
image: grafana/grafana
networks:
......@@ -82,7 +84,7 @@ services:
- ./monitoring/grafana/grafana.ini:/etc/grafana/grafana.ini
depends_on:
- prometheus
networks:
monitoring:
driver: bridge
......
......@@ -28,7 +28,7 @@ BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
SECRET_KEY = "e6cve$0dh*pzse)e2w%!kim^&a17*fgle@b4y!yvk@eih+r_4("
# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = os.environ.get("DEBUG", 'False') == 'True'
DEBUG = os.environ.get("DEBUG", "False") == "True"
ALLOWED_HOSTS = ["*"]
......@@ -93,7 +93,7 @@ WSGI_APPLICATION = "project.wsgi.application"
# Database
# https://docs.djangoproject.com/en/3.0/ref/settings/#databases
USE_POSTGRE = os.environ.get("DATABASE_IS_PSQL", 'False') == 'True'
USE_POSTGRE = os.environ.get("DATABASE_IS_PSQL", "False") == "True"
if USE_POSTGRE:
DATABASES = {
......@@ -165,11 +165,11 @@ USE_EMAIL = os.environ.get("EMAIL_HOST", 'False') != 'False'
if USE_EMAIL:
EMAIL_BACKEND = "django.core.mail.backends.smtp.EmailBackend"
EMAIL_HOST = os.environ.get("EMAIL_HOST")
EMAIL_HOST_USER = os.environ.get("EMAIL_HOST_USER")
EMAIL_HOST_PASSWORD = os.environ.get("EMAIL_HOST_PASSWORD")
EMAIL_PORT = os.environ.get("EMAIL_PORT")
EMAIL_USE_TLS = os.environ.get("EMAIL_USE_TLS")
EMAIL_HOST = os.environ.get("EMAIL_HOST", "localhost")
EMAIL_HOST_USER = os.environ.get("EMAIL_HOST_USER", None)
EMAIL_HOST_PASSWORD = os.environ.get("EMAIL_HOST_PASSWORD", None)
EMAIL_PORT = int(os.environ.get("EMAIL_PORT", 25))
EMAIL_USE_TLS = os.environ.get("EMAIL_USE_TLS", "False") == "True"
GOOGLE_CLIENT_ID = os.environ.get("GOOGLE_CLIENT_ID")
GOOGLE_CLIENT_SECRET = os.environ.get("GOOGLE_CLIENT_SECRET")
\ No newline at end of file
GOOGLE_CLIENT_SECRET = os.environ.get("GOOGLE_CLIENT_SECRET")
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment