Minor fixes. Logs should now show the real ip address not the caddy container ip.
This commit is contained in:
+3
-3
@@ -6,9 +6,9 @@ SQLALCHEMY_DATABASE_URI=postgresql+psycopg://postgres:123456@postgres:5432/petty
|
|||||||
MODULE_NAME=barker.main
|
MODULE_NAME=barker.main
|
||||||
PROJECT_NAME=barker
|
PROJECT_NAME=barker
|
||||||
MAX_WORKERS=4
|
MAX_WORKERS=4
|
||||||
NATS_URL=nats://{{ nats_host }}:{{ nats_port }}
|
NATS_URL={{ nats_url }}
|
||||||
SUBJECT="barker.print"
|
SUBJECT=barker.print
|
||||||
STREAM="barker_print_stream"
|
STREAM=barker_print_stream
|
||||||
SECRET_KEY={{ secret_key }}
|
SECRET_KEY={{ secret_key }}
|
||||||
MIDDLEWARE_SECRET_KEY={{ middleware_key }}
|
MIDDLEWARE_SECRET_KEY={{ middleware_key }}
|
||||||
ALGORITHM=HS256
|
ALGORITHM=HS256
|
||||||
|
|||||||
@@ -24,4 +24,4 @@
|
|||||||
create: true
|
create: true
|
||||||
mode: "0644"
|
mode: "0644"
|
||||||
when: not caddy_snippet_present
|
when: not caddy_snippet_present
|
||||||
notify: Restart caddy container
|
notify: Reload Caddy configuration
|
||||||
|
|||||||
@@ -6,3 +6,4 @@ middleware_key: c4b0b98ff9
|
|||||||
host: knox.mozimo.in
|
host: knox.mozimo.in
|
||||||
host_directory: "barker-{{ app_name }}"
|
host_directory: "barker-{{ app_name }}"
|
||||||
docker_network: "{{ host_directory }}_net"
|
docker_network: "{{ host_directory }}_net"
|
||||||
|
nats_url: "nats://clair.lan.tanshu.com:4222"
|
||||||
|
|||||||
@@ -166,4 +166,4 @@ app.frontend("/", directory="frontend", check_dir="auto")
|
|||||||
|
|
||||||
|
|
||||||
def init() -> None:
|
def init() -> None:
|
||||||
uvicorn.run(app, host=settings.HOST, port=9995)
|
uvicorn.run(app, host=settings.HOST, port=settings.PORT)
|
||||||
|
|||||||
@@ -30,6 +30,12 @@ port = os.getenv("PORT", "9995")
|
|||||||
bind_env = os.getenv("BIND", None)
|
bind_env = os.getenv("BIND", None)
|
||||||
use_bind = bind_env if bind_env else f"{host}:{port}"
|
use_bind = bind_env if bind_env else f"{host}:{port}"
|
||||||
|
|
||||||
|
# Tell Gunicorn to trust X-Forwarded-For headers from the reverse proxy
|
||||||
|
forwarded_allow_ips = "*"
|
||||||
|
|
||||||
|
# Optional: Ensure proxy protocol is recognized
|
||||||
|
proxy_allow_ips = "*"
|
||||||
|
|
||||||
loglevel = os.getenv("LOG_LEVEL", "info")
|
loglevel = os.getenv("LOG_LEVEL", "info")
|
||||||
accesslog_var = os.getenv("ACCESS_LOG", "-")
|
accesslog_var = os.getenv("ACCESS_LOG", "-")
|
||||||
accesslog = accesslog_var or None
|
accesslog = accesslog_var or None
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
[Unit]
|
[Unit]
|
||||||
Description=Frank container service
|
Description=Frank container service
|
||||||
After=docker.service netbird.service
|
BindsTo=dev-usb-lp0.device
|
||||||
|
After=docker.service netbird.service dev-usb-lp0.device
|
||||||
Wants=network-online.target docker.socket netbird.service
|
Wants=network-online.target docker.socket netbird.service
|
||||||
Requires=docker.socket netbird.service
|
Requires=docker.socket netbird.service
|
||||||
PartOf=netbird.service
|
PartOf=netbird.service
|
||||||
@@ -12,4 +13,4 @@ ExecStart=/usr/bin/docker start -a frank
|
|||||||
ExecStop=/usr/bin/docker stop -t 10 frank
|
ExecStop=/usr/bin/docker stop -t 10 frank
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
WantedBy=multi-user.target
|
WantedBy=multi-user.target dev-usb-lp0.device
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
#! /usr/bin/env bash
|
#! /usr/bin/env bash
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
echo uv run taskiq worker worker:broker
|
echo "Starting taskiq worker..."
|
||||||
uv run taskiq worker worker:broker
|
exec uv run taskiq worker worker:broker
|
||||||
|
|||||||
Reference in New Issue
Block a user