-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
30 changed files
with
712 additions
and
653 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,11 @@ | ||
FROM python:2 | ||
FROM python:3.3 | ||
|
||
WORKDIR /app/web | ||
|
||
RUN echo "PYTHONPATH=/usr/local/lib/python2.7/site-packages" | tee -a /etc/profile | ||
ENTRYPOINT ["/app/docker-entrypoint.sh"] | ||
EXPOSE 3000 | ||
CMD ["./manage.py", "runserver", "0.0.0.0:3000"] | ||
CMD ["python", "./manage.py", "runserver", "0.0.0.0:3000"] | ||
|
||
COPY . /app/ | ||
COPY web/settings/docker.py.example /app/web/settings/docker.py | ||
RUN pip install -r /app/requirements.txt | ||
RUN pip install --trusted-host pypi.python.org -r /app/requirements.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
FROM python:3.3 | ||
|
||
WORKDIR /app | ||
|
||
COPY ./requirements.txt /requirements.txt | ||
|
||
RUN pip install --trusted-host pypi.python.org -r /requirements.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
django==1.6 | ||
south | ||
#mysql-python | ||
git+https://github.com/PyMySQL/[email protected]#egg=MySQLdb | ||
# git+https://github.com/PyMySQL/[email protected]#egg=MySQLdb |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
#!/usr/bin/python2 | ||
|
||
import os | ||
import sys | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,67 +1,66 @@ | ||
"""Kisan alasivujen URLit ja sivujen otsikot""" | ||
# -*- coding: utf-8 -*- | ||
|
||
# Testikisan nimimääritys, oletusarvona: testikisa | ||
TESTIKISA = u"testikisa" | ||
TESTIKISA = "testikisa" | ||
|
||
# Kipa pääsivu | ||
|
||
KIPA_OTSIKKO = u"Kipa - kaikki kisat" | ||
KIPA_URL = u"http://127.0.0.1:8000/kipa" | ||
KIPA_OTSIKKO = "Kipa - kaikki kisat" | ||
KIPA_URL = "http://127.0.0.1:8000/kipa" | ||
|
||
# Suoritusten syöttö | ||
|
||
TULOSTEN_SYOTTO_OTSIKKO = u"Kipa - Syötä tuloksia" | ||
TULOSTEN_SYOTTO_URL = u"syota" | ||
TULOSTEN_SYOTTO_OTSIKKO = "Kipa - Syötä tuloksia" | ||
TULOSTEN_SYOTTO_URL = "syota" | ||
|
||
TULOSTEN_SYOTTO_TARKISTUS_OTSIKKO = u"Kipa - Syötä\ | ||
TULOSTEN_SYOTTO_TARKISTUS_OTSIKKO = "Kipa - Syötä\ | ||
tuloksia - tarkistussyötteet" | ||
TULOSTEN_SYOTTO_TARKISTUS_URL = u"syota/tarkistus" | ||
TULOSTEN_SYOTTO_TARKISTUS_URL = "syota/tarkistus" | ||
|
||
# Tulokset | ||
|
||
TULOSTEN_TARKISTUS_OTSIKKO = u"Kipa - Tulokset sarjoittain" | ||
TULOSTEN_TARKISTUS_URL = u"tulosta/normaali" | ||
TULOSTEN_TARKISTUS_OTSIKKO = "Kipa - Tulokset sarjoittain" | ||
TULOSTEN_TARKISTUS_URL = "tulosta/normaali" | ||
|
||
TUOMARINEUVOSTO_OTSIKKO = u"Kipa - Tuomarineuvoston antamien\ | ||
TUOMARINEUVOSTO_OTSIKKO = "Kipa - Tuomarineuvoston antamien\ | ||
tulosten määritys" | ||
TUOMARINEUVOSTO_URL = u"maarita/tuomarineuvos" | ||
TUOMARINEUVOSTO_URL = "maarita/tuomarineuvos" | ||
|
||
LASKENNAN_TILANNE_OTSIKKO = u"Kipa - Tulokset sarjoittain" | ||
LASKENNAN_TILANNE_URL = u"tulosta/tilanne" | ||
LASKENNAN_TILANNE_OTSIKKO = "Kipa - Tulokset sarjoittain" | ||
LASKENNAN_TILANNE_URL = "tulosta/tilanne" | ||
|
||
|
||
# Kisan Määritykset | ||
|
||
KISAN_MAARITYS_OTSIKKO = u"Kipa - Määritä kisa" | ||
KISAN_MAARITYS_URL = u"maarita" | ||
KISAN_MAARITYS_OTSIKKO = "Kipa - Määritä kisa" | ||
KISAN_MAARITYS_URL = "maarita" | ||
|
||
VARTIOIDEN_MAARITYS_OTSIKKO = u"Kipa - Määritä vartiot" | ||
VARTIOIDEN_MAARITYS_URL = u"maarita/vartiot" | ||
VARTIOIDEN_MAARITYS_OTSIKKO = "Kipa - Määritä vartiot" | ||
VARTIOIDEN_MAARITYS_URL = "maarita/vartiot" | ||
|
||
TEHTAVAN_MAARITYS_OTSIKKO = u"Kipa - Muokkaa tehtävää" | ||
TEHTAVAN_MAARITYS_URL = u"maarita/tehtava" | ||
TEHTAVAN_MAARITYS_OTSIKKO = "Kipa - Muokkaa tehtävää" | ||
TEHTAVAN_MAARITYS_URL = "maarita/tehtava" | ||
|
||
TESTITULOKSIEN_MAARITYS_OTSIKKO = u"Kipa - Testituloksien määritys" | ||
TESTITULOKSIEN_MAARITYS_URL = u"maarita/testitulos" | ||
TESTITULOKSIEN_MAARITYS_OTSIKKO = "Kipa - Testituloksien määritys" | ||
TESTITULOKSIEN_MAARITYS_URL = "maarita/testitulos" | ||
|
||
# Ylläpito | ||
|
||
# huom Listaa kaikki kisat linkki vie pääsivulle | ||
KAIKKI_KISAT_OTSIKKO = u"Kipa - kaikki kisat" | ||
KAIKKI_KISAT_OTSIKKO = "Kipa - kaikki kisat" | ||
KAIKKI_KISAT_URL = KIPA_OTSIKKO | ||
|
||
# Tallenna kisa, ei vielä osaamista filen vastaanottoon, TBD | ||
# "http://127.0.0.1:8000/kipa/testi_kisa/tallenna/ | ||
|
||
# Kisan tuonti tiedostosta, tod.näk helppoa käyttämällä fixtuuria.TBD | ||
KISAN_TUONTI_URL = u"korvaa" | ||
KISAN_TUONTI_OTSIKKO = u"Kipa - Korvaa kisa tiedostosta" | ||
KISAN_TUONTI_URL = "korvaa" | ||
KISAN_TUONTI_OTSIKKO = "Kipa - Korvaa kisa tiedostosta" | ||
|
||
# Poista Kisa | ||
KISAN_POISTO_OTSIKKO = u"Kipa - Poista kisa" | ||
KISAN_POISTO_URL = u"poista" | ||
KISAN_POISTO_OTSIKKO = "Kipa - Poista kisa" | ||
KISAN_POISTO_URL = "poista" | ||
|
||
# Autentikointi | ||
admin_tunnus = u"admin" | ||
admin_salasana = u"admin" | ||
admin_tunnus = "admin" | ||
admin_salasana = "admin" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,12 @@ | ||
with open("/app/db/secret.txt", "r") as f: | ||
SECRET_KEY = f.readline() | ||
|
||
DATABASES = { | ||
"default": { | ||
"ENGINE": "django.db.backends.sqlite3", | ||
"NAME": "/app/db/kipa.db", | ||
} | ||
} | ||
|
||
# Should we serve the media files through Python? | ||
SERVE_MEDIA = True |
Oops, something went wrong.