File tree Expand file tree Collapse file tree 5 files changed +17
-10
lines changed
Expand file tree Collapse file tree 5 files changed +17
-10
lines changed Original file line number Diff line number Diff line change @@ -121,7 +121,7 @@ services:
121121 container_name : frontend
122122 restart : unless-stopped
123123 environment :
124- PUBLIC_BACKEND_API : http ://localhost/api
124+ PUBLIC_BACKEND_API : https ://backend. localhost
125125 ports :
126126 - " 3000:3000"
127127 depends_on :
Original file line number Diff line number Diff line change @@ -43,7 +43,6 @@ dev = [
4343 " poethepoet>=0.39.0" ,
4444]
4545[tool .poe .tasks ]
46- celery = " celery -A app.celery worker --loglevel=info"
4746dev = " fastapi dev ./app/main.py"
4847
4948[tool .setuptools ]
Original file line number Diff line number Diff line change 11#! /bin/bash
2+ set -e
3+
4+ cd " $( dirname " $0 " ) /.." || exit 1
25
36alembic upgrade head
47uvicorn app.main:app --host 0.0.0.0 --port 8000
Original file line number Diff line number Diff line change 11#! /bin/bash
22
3- celery -A app.celery worker --loglevel=info
3+ # Run celery worker using (nproc - 1) concurrency, fallback to 1
4+ CORES=$( nproc)
5+ if [ " $CORES " -gt 1 ]; then
6+ CONCURRENCY=$(( CORES - 1 ))
7+ else
8+ CONCURRENCY=1
9+ fi
10+
11+ exec celery -A app.celery worker --concurrency " $CONCURRENCY " --loglevel=info --max-memory-per-child=131072
Original file line number Diff line number Diff line change 11{
22 # email your-email@example.com
33}
4-
5- localhost {
6- # Reverse proxy for the Backend API
7- handle_path /api* {
4+ backend.localhost {
5+ handle {
86 reverse_proxy backend:8000
97 }
8+ }
109
10+ localhost {
1111 # Reverse proxy for the Frontend
1212 handle {
1313 reverse_proxy frontend:3000
1414 }
1515
16- log {
17- output file /var/log/caddy/access.log
18- }
1916}
You can’t perform that action at this time.
0 commit comments