Skip to content
This repository has been archived by the owner on Jan 5, 2021. It is now read-only.

Installation and Settings

punkyoon edited this page Nov 26, 2017 · 15 revisions

Installation

Docker Usage Guide

Using Docker makes deployment easier! (recommended)

1. Docker Installation

2. Executing study-hard using docker

$ git clone https://github.com/punkyoon/study-hard
$ cd study-hard
$ docker-compose up -d
$ make

Settings

1. E-mail backend

To find the password, you must complete the email backend setting before deployment. You can set the following things directly.

...
EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
EMAIL_USE_TLS = True
EMAIL_PORT = 587
EMAIL_HOST = 'smtp.test.com'    # NEED TO CHANGE!

EMAIL_HOST_USER = 'test@test.com'    # NEED TO CHANGE!
# USING ENVIRONMENT VARIABLE!
EMAIL_HOST_PASSWORD = os.environ.get('EMAIL_PASS')
SERVER_EMAIL = 'test@test.com'    # NEED TO CHANGE!
DEFAULT_FROM_MAIL = 'TEST_DEVELOPER'    # NEED TO CHANGE!
...

and you can set environment variable like this:

$ export EMAIL_PATH="P@sSw0rD"

2. Admin page path

Changing the admin page path further enhances security. This is a recommendation, not a requirement.

Before change

...
url(r'^admin/', admin.site.urls),
...

After change (example)

...
url(r'^site_management/', admin.site.urls),
...

You can access admin page via https://(site_url)/site_management

3. Root password

Once the project is successfully deployed, you will see that the root password has been created automatically. The root password can be changed on the admin page.

4. DB password

Before you deploy, we recommend to change the default DB password.

...
- POSTGRES_PASSWORD=temporary@P@SSW0rD
...
...
'PASSWORD': 'temporary@P@SSW0rD',
...

5. Terms and Conditions in register process

Before you deploy, we encourage you to revise the Site Membership terms and conditions

...
<div class="modal-body" style="height: 250px; overflow-y: auto;">
  <!-- Need to modify below lines! -->
  <p>1. Privacy</p>
  <p>Example</p>
  <p>2. Safety</p>
  <p>Example</p>
  <p>3. Registration and Account Security</p>
  <p>Example</p>
  <p>4. Other</p>
  <p>Example</p>
  <!-- end -->
</div>
...