-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
move docker from root to example dir
- Loading branch information
1 parent
7206653
commit 3b3ef42
Showing
8 changed files
with
54 additions
and
48 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
FROM python:3.12-slim | ||
COPY --from=ghcr.io/astral-sh/uv:latest /uv /bin/uv | ||
|
||
RUN useradd --uid 1001 --user-group --home-dir=/home/bored-charts --create-home --shell=/bin/false bored-charts | ||
USER bored-charts | ||
|
||
COPY --chown=bored-charts pyproject.toml /app/pyproject.toml | ||
RUN chown bored-charts:bored-charts /app | ||
|
||
WORKDIR /app | ||
RUN uv sync --no-install-project --no-install-workspace --no-dev --compile-bytecode | ||
|
||
COPY --chown=bored-charts . /app | ||
WORKDIR /app | ||
|
||
RUN uv sync | ||
|
||
ENV PATH="/app/.venv/bin:$PATH" | ||
ENV PYTHONUNBUFFERED=1 | ||
EXPOSE 4000 | ||
CMD ["bc-example"] | ||
HEALTHCHECK CMD ["curl", "--fail", "http://localhost:4000/healthz"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
.PHONY: dev | ||
## Run locally | ||
dev: | ||
UVICORN_RELOAD=true uv run bc-example | ||
|
||
.PHONY: up | ||
## Start docker compose | ||
up: | ||
docker compose up --build | ||
|
||
.PHONY: down | ||
## Stop docker compose | ||
down: | ||
docker compose down --remove-orphans |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.