-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcompose.yml
27 lines (24 loc) · 863 Bytes
/
compose.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# Based on https://github.com/astral-sh/uv-docker-example
# `docker compose up --watch`
services:
web:
# Build the image from the Dockerfile in the current directory
build: .
# Host the FastAPI application on port 8000
ports:
- "8000:8000"
develop:
# Create a `watch` configuration to update the appl
# https://docs.docker.com/compose/file-watch/#compose-watch-versus-bind-mounts
watch:
# Sync the working directory with the `/app` directory in the container
- action: sync
path: .
target: /app
# Exclude the project virtual environment — it could be for a
# different platform in the container
ignore:
- .venv/
# Rebuild the image on changes to the `pyproject.toml`
- action: rebuild
path: ./pyproject.toml