Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Merge pull request #1 from EditionOpenAccess/molgen
Molgen
- Loading branch information
Showing
168 changed files
with
15,548 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# excluded files are not sent to build context | ||
# this keeps docker files smaller and file transfers lower | ||
.dockerignore | ||
.gitignore | ||
.gitlab-ci.yml | ||
myvenv | ||
eoa-venv |
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,12 @@ | ||
*.pyc | ||
*~ | ||
*.key | ||
*.pem | ||
*.crt | ||
__pychache__ | ||
myvenv | ||
eoa-venv | ||
db.sqlite3 | ||
/static | ||
.DS_Store | ||
**/migrations |
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,42 @@ | ||
image: django:latest | ||
|
||
.shared_hidden_key: &test | ||
services: | ||
- postgres:latest | ||
|
||
.shared_hidden_key: &deploy | ||
before_script: | ||
- 'which ssh-agent || ( apt-get update -y && apt-get install openssh-client -y )' | ||
- eval $(ssh-agent -s) | ||
- ssh-add <(echo "$SSH_PRIVATE_KEY") | ||
- mkdir -p ~/.ssh | ||
- '[[ -f /.dockerenv ]] && echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config' | ||
|
||
stages: | ||
- test | ||
- deploy | ||
|
||
variables: | ||
POSTGRES_DB: postgres | ||
POSTGRES_USER: postgres | ||
POSTGRES_PASSWORD: dev | ||
|
||
all_tests: | ||
<<: *test | ||
stage: test | ||
script: | ||
- pip install -r config/requirements.txt | ||
- PGPASSWORD=dev psql -h postgres -U postgres -d template1 -c 'create extension hstore;' | ||
- sh scripts/run_tests.sh | ||
|
||
deploy: | ||
<<: *deploy | ||
stage: deploy | ||
script: | ||
- ssh -t cloud@$DEPLOYHOST "export ADMIN_PWD=$DJANGO_ADMIN_PWD && cd django/eoa-django-test && git fetch --all && git reset --hard origin/master && sh scripts/start_deploy.sh " | ||
environment: | ||
name: production | ||
url: https://c105-187.cloud.gwdg.de/publications/studies/312/index.html | ||
only: | ||
- master | ||
when: manual |
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,8 @@ | ||
FROM python:3.5 | ||
ENV PYTHONUNBUFFERED 1 | ||
RUN mkdir /code | ||
WORKDIR /code | ||
ADD config/requirements.txt /code/ | ||
RUN apt-get update && apt-get install -y postgresql-client | ||
RUN pip3 install -r requirements.txt | ||
ADD . /code/ |
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,7 @@ | ||
Using TEI importer for Django models | ||
------------------------------------ | ||
|
||
This example shows how to use Django models to import a TEI document. | ||
This example shows how to use Django models to import a TEI document. | ||
A view for TEI documents is used to display the database entry as a basic html side. | ||
|
||
Mirror is maintained. Or not. |
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 @@ | ||
no text |
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,43 @@ | ||
upstream web { | ||
ip_hash; | ||
server web:8000; | ||
} | ||
|
||
server { | ||
listen 80; | ||
listen [::]:80; | ||
return 301 https://$host$request_uri; | ||
} | ||
|
||
|
||
server { | ||
|
||
location /static/ { | ||
autoindex on; | ||
alias /static/; | ||
} | ||
|
||
location / { | ||
proxy_pass http://web/; | ||
} | ||
|
||
location /.well-known { | ||
alias /var/www/c105-187.cloud.gwdg.de/.well-known; | ||
} | ||
|
||
listen 443 ssl default_server; | ||
listen [::]:443 ssl default_server; | ||
server_name c105-187.cloud.gwdg.de; | ||
ssl_certificate /etc/nginx/certs/fullchain.pem; | ||
ssl_certificate_key /etc/nginx/certs/privkey.pem; | ||
|
||
ssl_stapling on; | ||
ssl_stapling_verify on; | ||
|
||
ssl_session_cache shared:le_nginx_SSL:1m; | ||
ssl_session_timeout 1440m; | ||
|
||
ssl_protocols TLSv1 TLSv1.1 TLSv1.2; | ||
ssl_prefer_server_ciphers on; | ||
ssl_ciphers "ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA:ECDHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-RSA-AES256-SHA256:DHE-RSA-AES256-SHA:ECDHE-ECDSA-DES-CBC3-SHA:ECDHE-RSA-DES-CBC3-SHA:EDH-RSA-DES-CBC3-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256:AES128-SHA:AES256-SHA:DES-CBC3-SHA:!DSS"; | ||
} |
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,8 @@ | ||
Django | ||
psycopg2 | ||
Pillow | ||
xmltodict | ||
django-cms | ||
django-sekizai | ||
lxml | ||
beautifulsoup4 |
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,32 @@ | ||
version: '3' | ||
|
||
services: | ||
nginx: | ||
image: nginx:latest | ||
environment: | ||
- DEPLOYHOST | ||
ports: | ||
- "80:80" | ||
- "443:443" | ||
volumes: | ||
- .:/code | ||
- ./config/certs:/etc/nginx/certs:ro | ||
- ./config/nginx:/etc/nginx/conf.d | ||
- ./static:/static | ||
depends_on: | ||
- web | ||
web: | ||
build: . | ||
environment: | ||
- ADMIN_PWD | ||
command: ["scripts/wait_for_pg.sh","postgres","sh","scripts/loaddjango.sh"] | ||
depends_on: | ||
- postgres | ||
volumes: | ||
- .:/code | ||
- ./static:/static | ||
#expose: | ||
# - "8000" | ||
|
||
postgres: | ||
build: ./scripts/pghstore/. |
Empty file.
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,17 @@ | ||
from django.contrib import admin | ||
from .models import * | ||
|
||
admin.site.register(Publication) | ||
admin.site.register(Author) | ||
admin.site.register(Citation) | ||
admin.site.register(Part) | ||
admin.site.register(Chapter) | ||
admin.site.register(Section) | ||
admin.site.register(Subsection) | ||
admin.site.register(Subsubsection) | ||
admin.site.register(Paragraph) | ||
admin.site.register(MixedContent) | ||
admin.site.register(Text) | ||
admin.site.register(Table) | ||
admin.site.register(Figure) | ||
# Register your models here. |
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,5 @@ | ||
from django.apps import AppConfig | ||
|
||
|
||
class EoaConfig(AppConfig): | ||
name = 'eoa' |
Oops, something went wrong.