Skip to content
This repository has been archived by the owner on Dec 3, 2022. It is now read-only.

Commit

Permalink
Merge branch 'master' into update_app_version
Browse files Browse the repository at this point in the history
  • Loading branch information
tar-xzvff authored Aug 22, 2018
2 parents db277da + 6461cec commit 582ef0b
Show file tree
Hide file tree
Showing 8 changed files with 66 additions and 7 deletions.
3 changes: 1 addition & 2 deletions course/templates/course/home.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@
<h1>{% blocktrans with RELATE=relate_site_name %} Welcome to {{ RELATE }} {% endblocktrans %}</h1>
<p>{% trans "RELATE is an Environment for Learning And TEaching" %}</p>
<p>
<a class="btn btn-lg btn-primary" href="http://icttoracon.net/" role="button">{% trans "Learn more" %} &raquo;</a></p><a class="btn btn-lg btn-primary" href="https://prep.icttoracon.net/pstate/" role="button">実技問題はこちら</a><p>
</p>
<a class="btn btn-lg btn-primary" href="http://icttoracon.net/" role="button">{% trans "Learn more" %} &raquo;</a></p>
</div>
{% endblock %}
{% block course_list %}
Expand Down
2 changes: 1 addition & 1 deletion development_settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
'ENGINE': 'django.db.backends.postgresql_psycopg2',
'NAME': 'relate',
'USER': 'relate',
'PASSWORD': '',
'PASSWORD': 'iCtsC2O18',
'HOST': 'db.prep-dev.icttoracon.net',
'PORT': '5432',
}
Expand Down
3 changes: 2 additions & 1 deletion docker/relate_webui/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,5 @@ COPY ./ /relate-for-ictsc/
RUN npm install

RUN python manage.py collectstatic --noinput
CMD ["uwsgi","--http",":7777","--file","/relate-for-ictsc/relate/wsgi.py"]
# CMD ["uwsgi","-p","10","--http",":7777","--file","/relate-for-ictsc/relate/wsgi.py"]
CMD ["gunicorn", "relate.wsgi", "-b", "0.0.0.0:7777", "-w", "10", "--timeout", "30", "--graceful-timeout", "20", "--max-requests", "1000", "--max-requests-jitter", "500", "--backlog", "500", "--access-logfile", "-", "--error-logfile", "-"]
2 changes: 1 addition & 1 deletion docker_build.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/usr/bin/env bash

docker build -t relate-webui:20180823006 -f docker/relate_webui/Dockerfile .
docker build -t relate-webui:20180818008 -f docker/relate_webui/Dockerfile .

docker build -t relate-staticfiles-webserver:20180524 -f docker/relate_staticfiles_webserver/Dockerfile .
2 changes: 2 additions & 0 deletions local_settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@

if os.environ['DEPLOYMENT_ENV'] == 'production':
from production_settings import *
elif os.environ['DEPLOYMENT_ENV'] == 'training':
from training_settings import *
elif os.environ['DEPLOYMENT_ENV'] == 'staging':
from staging_settings import *
elif os.environ['DEPLOYMENT_ENV'] == 'development':
Expand Down
2 changes: 1 addition & 1 deletion manifest/helm/relate.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ metadata:
spec:
containers:
- name: relate
image: relate-webui:20180823006
image: relate-webui:20180818008
ports:
- name: relate
containerPort: 7777
Expand Down
4 changes: 3 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -104,4 +104,6 @@ IPython
# vim: foldmethod=marker

psycopg2-binary==2.7.5
psycopg2==2.7.4
psycopg2==2.7.4

gunicorn==19.9.0
55 changes: 55 additions & 0 deletions training_settings.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
from base_settings import *

SECRET_KEY = '<CHANGE ME TO SOME RANDOM STRING ONCE IN PRODUCTION>'

ALLOWED_HOSTS = [
"*",
]

CSRF_TRUSTED_ORIGINS = [
".prep-training.icttoracon.net",
]

# Configure the following as url as above.
RELATE_BASE_URL = "http://YOUR/RELATE/SITE/DOMAIN"

RELATE_CUTOMIZED_SITE_NAME = gettext_noop("ICTSC PREP SCHOOL")

DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql_psycopg2',
'NAME': 'relate',
'USER': 'relate',
'PASSWORD': '',
'HOST': 'db.prep-training.icttoracon.net',
'PORT': '5432',
}
}

# {{{ git storage

# Your course git repositories will be stored under this directory.
# Make sure it's writable by your web user.
#
# The default below makes them sit side-by-side with your relate checkout,
# which makes sense for development, but you probably want to change this
# in production.
#
# The 'course identifiers' you enter will be directory names below this root.

# GIT_ROOT = "/some/where"
GIT_ROOT = "/var"

# }}}

# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = False

TIME_ZONE = "Asia/Tokyo"

# {{{ sign-in methods

RELATE_SIGN_IN_BY_EMAIL_ENABLED = False
RELATE_SIGN_IN_BY_USERNAME_ENABLED = True
RELATE_REGISTRATION_ENABLED = False
RELATE_SIGN_IN_BY_EXAM_TICKETS_ENABLED = False

0 comments on commit 582ef0b

Please sign in to comment.