-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yaml
30 lines (30 loc) · 1.25 KB
/
docker-compose.yaml
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
28
29
30
services:
app:
# Use the container image built from the specified Dockerfile.
build: { context: ".", dockerfile: Dockerfile }
restart: unless-stopped
ports:
# Map a host port (by default, 8000, but it can be overridden via an
# environment variable) to port 8000 of the container; the latter being
# the port on which the FastAPI development server listens by default.
#
# The environment variable can be specified either via an `.env` file,
# or by defining it when invoking `docker compose`, like this:
# ```
# $ PORT=1234 docker compose up
# ```
#
- "${PORT:-8000}:8000"
volumes:
# Mount the root directory of the repository, at `/app` within the container.
#
# Note: This will overwrite any `/app` directory within the container, that
# might have been created while building the container (i.e. while
# processing the `Dockerfile`).
#
# It doesn't overwrite Poetry-installed packages, though, as those do
# not get installed within the `/app` directory. You can see where they
# get installed by running `$ poetry run pip show {package_name}`
# within the container.
#
- ".:/app"