commit
This commit is contained in:
parent
e411e71b89
commit
211f6c75ad
@ -25,7 +25,7 @@ SECRET_KEY = 'django-insecure-#q!-odx05#6o&1dek)4shtqdw!)s5oonenb(tcmuwclu^dy4!#
|
|||||||
# SECURITY WARNING: don't run with debug turned on in production!
|
# SECURITY WARNING: don't run with debug turned on in production!
|
||||||
DEBUG = False
|
DEBUG = False
|
||||||
|
|
||||||
ALLOWED_HOSTS = ['https://alkator.cz', 'https://beta.alkator.cz', 'localhost']
|
ALLOWED_HOSTS = ['127.0.0.1', 'https://alkator.cz', 'https://beta.alkator.cz', 'localhost']
|
||||||
|
|
||||||
CSRF_TRUSTED_ORIGINS = ['https://alkator.cz', 'https://beta.alkator.cz']
|
CSRF_TRUSTED_ORIGINS = ['https://alkator.cz', 'https://beta.alkator.cz']
|
||||||
|
|
||||||
@ -85,7 +85,6 @@ DATABASES = {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
COMGATE_MERCHANT = 484757
|
COMGATE_MERCHANT = 484757
|
||||||
COMGATE_TEST = True
|
COMGATE_TEST = True
|
||||||
COMGATE_SECRET = '2c07bfabd1a5e4a312dc49929de60aa2'
|
COMGATE_SECRET = '2c07bfabd1a5e4a312dc49929de60aa2'
|
||||||
|
@ -16,7 +16,6 @@ Including another URLconf
|
|||||||
"""
|
"""
|
||||||
from django.contrib import admin
|
from django.contrib import admin
|
||||||
from django.urls import path
|
from django.urls import path
|
||||||
from django.conf.urls.static import static
|
|
||||||
from alkatorapi.views import (
|
from alkatorapi.views import (
|
||||||
register_user, register_racer,
|
register_user, register_racer,
|
||||||
login, logout,
|
login, logout,
|
||||||
@ -52,4 +51,4 @@ urlpatterns = [
|
|||||||
path('api/cart/select_delivery', select_delivery),
|
path('api/cart/select_delivery', select_delivery),
|
||||||
path('api/cart/delivery', delivery),
|
path('api/cart/delivery', delivery),
|
||||||
path('api/forgotten_password', forgotten_password),
|
path('api/forgotten_password', forgotten_password),
|
||||||
] + static('/', document_root='frontend/build')
|
]
|
13
compose.yaml
Normal file
13
compose.yaml
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
services:
|
||||||
|
api:
|
||||||
|
build: .
|
||||||
|
volumes:
|
||||||
|
- /home/meiri/alkator.dbsqlite3:/alkator/db.sqlite3
|
||||||
|
ports:
|
||||||
|
- "8005:8005"
|
||||||
|
nginx:
|
||||||
|
image: nginx
|
||||||
|
ports:
|
||||||
|
- "8004:80"
|
||||||
|
volumes:
|
||||||
|
- ./nginx.conf:/etc/nginx/nginx.conf:ro
|
79
nginx.conf
Normal file
79
nginx.conf
Normal file
@ -0,0 +1,79 @@
|
|||||||
|
worker_processes 2;
|
||||||
|
|
||||||
|
events {
|
||||||
|
worker_connections 1024;
|
||||||
|
}
|
||||||
|
|
||||||
|
http {
|
||||||
|
include mime.types;
|
||||||
|
default_type application/octet-stream;
|
||||||
|
|
||||||
|
|
||||||
|
sendfile on;
|
||||||
|
keepalive_timeout 65;
|
||||||
|
|
||||||
|
map $http_referer $httpReferer {
|
||||||
|
default "$http_referer";
|
||||||
|
"" "(direct)";
|
||||||
|
}
|
||||||
|
map $http_user_agent $httpAgent {
|
||||||
|
default "$http_user_agent";
|
||||||
|
"" "Unknown";
|
||||||
|
}
|
||||||
|
log_format json escape=json '{'
|
||||||
|
'"time_local": "$time_local", '
|
||||||
|
'"remote_addr": "$remote_addr", '
|
||||||
|
'"request_uri": "$request_uri", '
|
||||||
|
'"status": "$status", '
|
||||||
|
'"http_referer": "$httpReferer", '
|
||||||
|
'"http_user_agent": "$httpAgent", '
|
||||||
|
'"server_name": "$server_name", '
|
||||||
|
'"request_time": "$request_time" '
|
||||||
|
'}';
|
||||||
|
|
||||||
|
server {
|
||||||
|
listen 8080;
|
||||||
|
server_name localhost;
|
||||||
|
location = /stub_status{
|
||||||
|
stub_status;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
server {
|
||||||
|
listen 80;
|
||||||
|
|
||||||
|
server_name zaloha.alkator.cz;
|
||||||
|
|
||||||
|
access_log /var/log/nginx/access.log json;
|
||||||
|
error_log /var/log/nginx/error.log;
|
||||||
|
root /alkator/frontend/build;
|
||||||
|
|
||||||
|
location /api{
|
||||||
|
proxy_read_timeout 300;
|
||||||
|
proxy_pass http://localhost:8002;
|
||||||
|
}
|
||||||
|
location /api/upload_files{
|
||||||
|
client_max_body_size 100M;
|
||||||
|
proxy_pass http://localhost:8002;
|
||||||
|
}
|
||||||
|
location /admin {
|
||||||
|
proxy_pass http://localhost:8002;
|
||||||
|
}
|
||||||
|
location /static {
|
||||||
|
root /alkator;
|
||||||
|
}
|
||||||
|
location /photos {
|
||||||
|
root /alkator;
|
||||||
|
}
|
||||||
|
location /favicon.ico {
|
||||||
|
root /alkator;
|
||||||
|
}
|
||||||
|
|
||||||
|
location / {
|
||||||
|
try_files $uri $uri/index.html =404;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
include sites-enabled/*;
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user