change configs for deployment
This commit is contained in:
+2
-1
@@ -1 +1,2 @@
|
|||||||
data/
|
data/
|
||||||
|
*.log
|
||||||
+3
-3
@@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"base_url": "http://localhost:8080/s",
|
"base_url": "https://xcel.me/s",
|
||||||
"api_key": "change-this-secret-key",
|
"api_key": "change-this-secret-key",
|
||||||
"host": "0.0.0.0",
|
"host": "0.0.0.0",
|
||||||
"port": 8080,
|
"port": 8080,
|
||||||
@@ -7,9 +7,9 @@
|
|||||||
"retention_days": 0,
|
"retention_days": 0,
|
||||||
"min_short_length": 6,
|
"min_short_length": 6,
|
||||||
"max_short_length": 32,
|
"max_short_length": 32,
|
||||||
"max_url_length": 2048,
|
"max_url_length": 131072,
|
||||||
"max_retention_days": 3650,
|
"max_retention_days": 3650,
|
||||||
"rate_limit_requests": 60,
|
"rate_limit_requests": 10,
|
||||||
"rate_limit_window": 60
|
"rate_limit_window": 60
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1 @@
|
|||||||
|
*.db
|
||||||
+1
-1
@@ -4,7 +4,7 @@ services:
|
|||||||
working_dir: /app
|
working_dir: /app
|
||||||
command: ["python", "-u", "urlshort.py", "config.json"]
|
command: ["python", "-u", "urlshort.py", "config.json"]
|
||||||
ports:
|
ports:
|
||||||
- "8080:8080"
|
- "127.0.0.1:18082:8080"
|
||||||
volumes:
|
volumes:
|
||||||
- ./urlshort.py:/app/urlshort.py:ro
|
- ./urlshort.py:/app/urlshort.py:ro
|
||||||
- ./config.json:/app/config.json:ro
|
- ./config.json:/app/config.json:ro
|
||||||
|
|||||||
+1
-1
@@ -36,7 +36,7 @@ location ^~ /s/static/ {
|
|||||||
# --- Proxy everything else under /s/ to the Python backend ---
|
# --- Proxy everything else under /s/ to the Python backend ---
|
||||||
# Covers: /s/api/shorten, /s/api/urls, /s/api/lookup, /s/<code> redirects
|
# Covers: /s/api/shorten, /s/api/urls, /s/api/lookup, /s/<code> redirects
|
||||||
location /s/ {
|
location /s/ {
|
||||||
proxy_pass http://urlshort:8080;
|
proxy_pass http://127.0.0.1:18082;
|
||||||
proxy_http_version 1.1;
|
proxy_http_version 1.1;
|
||||||
|
|
||||||
proxy_set_header Host $host;
|
proxy_set_header Host $host;
|
||||||
|
|||||||
Reference in New Issue
Block a user