Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Model refactor (#280) #322

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -130,11 +130,8 @@ dmypy.json

# --- USER-ADDED IGNORES --- #

# The settings file.
bcodb/settings.py

# The server configuration file.
server.conf
.secrets

# The migrations folder.
# bco_api/api/migrations/
Expand All @@ -143,3 +140,4 @@ server.conf
static/
# JetBrains IDEs
.idea/
backups
15 changes: 15 additions & 0 deletions .secrets.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
[DJANGO_KEYS]
SECRET_KEY=
ANON_KEY=

[SERVER]
PRODUCTION=
DEBUG=True
ALLOWED_HOSTS=
SERVER_VERSION=
HOSTNAME=
HUMAN_READABLE_HOSTNAME=
PUBLIC_HOSTNAME=
SERVER_URL=
DATABASE=
EMAIL_BACKEND=
21 changes: 20 additions & 1 deletion admin_only/bco_api.conf
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,25 @@ server {
proxy_pass http://127.0.0.1:8080;
}

# BCO API - Draft objects
#location ~* \/BCO_(\d+)\/(\d+)\.(\d+) {
location ~* ^/[a-zA-Z]+_DRAFT_(.*?) {
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_pass http://unix:/var/run/bco_api.sock;
}

# BCO API - Published objects
#location ~* \/BCO_(\d+)\/(\d+)\.(\d+) {
location ~* ^/[a-zA-Z]+_(.*?) {
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_pass http://unix:/var/run/bco_api.sock;
}

location / {
if ($request_method = 'OPTIONS') {
Expand All @@ -51,7 +70,7 @@ server {
return 204;
}

root /var/www/bcoeditor/portal/build/;
root root /var/www/bcoeditor/portal_userdb/client/build;
try_files $uri /index.html;
#try_files $uri $uri/ =404;
}
Expand Down
6 changes: 3 additions & 3 deletions admin_only/bco_api.service
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
[Unit]
Description=BCO Test API gunicorn daemon
Description=BCODB API gunicorn daemon
Requires=bco_api.socket
After=network.target

[Service]
User=bco_api_user
Group=nginx
WorkingDirectory=/var/www/bcoeditor/bco_api/bco_api/
ExecStart=/var/www/bcoeditor/bco_api/env/bin/gunicorn --access-logfile /var/log/gunicorn/api_stdout.log --log-level=debug --log-file /var/log/gunicorn/api_stderr.log --workers 3 --bind unix:/var/run/bco_api.sock bco_api.wsgi:application
WorkingDirectory=/var/www/bcoeditor/bco_api/
ExecStart=/var/www/bcoeditor/bco_api/env/bin/gunicorn --access-logfile /var/log/gunicorn/api_stdout.log --log-level=debug --log-file /var/log/gunicorn/api_stderr.log --workers 3 --bind unix:/var/run/bco_api.sock config.wsgi:application
20 changes: 0 additions & 20 deletions api/admin.py

This file was deleted.

26 changes: 0 additions & 26 deletions api/apps.py

This file was deleted.

Loading
Loading