Compare commits
No commits in common. "c6aaccda6789473158aa98d82db23fc6d8af5485" and "e411e71b894450eff780982bc73acac37d819805" have entirely different histories.
c6aaccda67
...
e411e71b89
@ -1,8 +1,9 @@
|
|||||||
FROM greyltc/archlinux-aur:yay
|
FROM greyltc/archlinux-aur:yay
|
||||||
WORKDIR /alkator
|
WORKDIR /alkator
|
||||||
COPY . .
|
COPY . .
|
||||||
RUN pacman -Syu python python-weasyprint python-dateutil python-django npm --noconfirm
|
run pacman -Syu python python-weasyprint python-dateutil python-django npm --noconfirm
|
||||||
RUN sudo -u ab -D~ bash -c 'yay -Syu --removemake --needed --noprogressbar --noconfirm python-daphne'
|
RUN sudo -u ab -D~ bash -c 'yay -Syu --removemake --needed --noprogressbar --noconfirm python-daphne'
|
||||||
RUN cd frontend && npm install && npm run build && rm -rf node_modules && cd ..
|
RUN cd frontent && npm install && npm run build && rm -rf node_modules && cd ..
|
||||||
EXPOSE 8005
|
RUN python manage.py collectstatic
|
||||||
CMD ["/usr/bin/daphne", "alkator.asgi:application", "-p", "8005"]
|
EXPOSE 8002
|
||||||
|
CMD ["/usr/bin/daphne", "alkator.asgi:application", "-p", "8002"]
|
||||||
|
@ -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 = ['127.0.0.1', 'https://alkator.cz', 'https://beta.alkator.cz', 'localhost']
|
ALLOWED_HOSTS = ['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,6 +85,7 @@ DATABASES = {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
COMGATE_MERCHANT = 484757
|
COMGATE_MERCHANT = 484757
|
||||||
COMGATE_TEST = True
|
COMGATE_TEST = True
|
||||||
COMGATE_SECRET = '2c07bfabd1a5e4a312dc49929de60aa2'
|
COMGATE_SECRET = '2c07bfabd1a5e4a312dc49929de60aa2'
|
||||||
|
@ -16,6 +16,7 @@ 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,
|
||||||
@ -51,4 +52,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
13
compose.yaml
@ -1,13 +0,0 @@
|
|||||||
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
79
nginx.conf
@ -1,79 +0,0 @@
|
|||||||
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:8005;
|
|
||||||
}
|
|
||||||
location /api/upload_files{
|
|
||||||
client_max_body_size 100M;
|
|
||||||
proxy_pass http://localhost:8005;
|
|
||||||
}
|
|
||||||
location /admin {
|
|
||||||
proxy_pass http://localhost:8005;
|
|
||||||
}
|
|
||||||
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