Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ filterwarnings = [
dev = [
"pre-commit>=4.3.0",
"pytest-asyncio>=1.0.0",
"watchfiles>=1.1.1",
]

[tool.mypy]
Expand Down
2 changes: 1 addition & 1 deletion scripts/local_with_uvicorn/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -40,5 +40,5 @@ USER app
WORKDIR /code

# -------- replace with comment to run with gunicorn --------
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8000", "--reload"]
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8000", "--reload", "--reload-include", ".env"]
# CMD ["gunicorn", "app.main:app", "-w", "4", "-k", "uvicorn.workers.UvicornWorker", "-b", "0.0.0.0:8000"]
26 changes: 9 additions & 17 deletions scripts/local_with_uvicorn/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,13 @@
services:
web:
build:
build:
context: .
dockerfile: Dockerfile
# -------- Both of the following commands should be commented to run with nginx --------

# -------- replace with comment to run with gunicorn --------
command: uvicorn app.main:app --host 0.0.0.0 --port 8000 --reload
# command: gunicorn app.main:app -w 4 -k uvicorn.workers.UvicornWorker -b 0.0.0.0:8000
env_file:
- ./src/.env
# -------- replace with expose if you are using nginx --------
environment:
# Enable polling for file changes on macOS/Windows Docker Desktop
- WATCHFILES_FORCE_POLLING=true
ports:
- "8000:8000"
# expose:
# - "8000"
depends_on:
- db
- redis
Expand All @@ -23,7 +16,7 @@ services:
- ./src/.env:/code/.env

worker:
build:
build:
context: .
dockerfile: Dockerfile
command: arq app.core.worker.settings.WorkerSettings
Expand Down Expand Up @@ -64,7 +57,7 @@ services:

#-------- uncomment to create first superuser --------
create_superuser:
build:
build:
context: .
dockerfile: Dockerfile
env_file:
Expand All @@ -78,9 +71,9 @@ services:

#-------- uncomment to run tests --------
pytest:
build:
build:
context: .
dockerfile: Dockerfile
dockerfile: Dockerfile
env_file:
- ./src/.env
depends_on:
Expand All @@ -93,7 +86,7 @@ services:

#-------- uncomment to create first tier --------
# create_tier:
# build:
# build:
# context: .
# dockerfile: Dockerfile
# env_file:
Expand All @@ -109,4 +102,3 @@ services:
volumes:
postgres-data:
redis-data:

Loading