Skip to content

Commit

Permalink
Fix deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
MrNaif2018 committed Dec 24, 2024
1 parent 386ade9 commit c9c8315
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 14 deletions.
4 changes: 1 addition & 3 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ jobs:
- run:
name: install dependencies
command: |
cd generator
curl -LsSf https://astral.sh/uv/install.sh | sh
uv sync --frozen --compile-bytecode
echo ". ~/repo/.venv/bin/activate" >> $BASH_ENV
Expand Down Expand Up @@ -53,8 +52,7 @@ jobs:
- run:
name: build docker image
command: |
cd generator
docker buildx build --progress plain --push --platform ${BUILD_PLATFORMS} --tag bitcart/docker-compose-generator:latest \
docker buildx build -f generator/Dockerfile --progress plain --push --platform ${BUILD_PLATFORMS} --tag bitcart/docker-compose-generator:latest \
--tag ghcr.io/bitcart/docker-compose-generator:latest .
workflows:
Expand Down
8 changes: 0 additions & 8 deletions .coveragerc

This file was deleted.

2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ repos:
hooks:
- id: check-merge-conflict
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.8.3
rev: v0.8.4
hooks:
- id: ruff
- id: ruff-format
Expand Down
2 changes: 1 addition & 1 deletion build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ set -e

: "${BITCARTGEN_DOCKER_IMAGE:=bitcart/docker-compose-generator}"
if [ "$BITCARTGEN_DOCKER_IMAGE" == "bitcart/docker-compose-generator:local" ]; then
docker build generator --tag $BITCARTGEN_DOCKER_IMAGE
docker build -f generator/Dockerfile . --tag $BITCARTGEN_DOCKER_IMAGE
else
set +e
docker pull $BITCARTGEN_DOCKER_IMAGE
Expand Down
4 changes: 3 additions & 1 deletion generator/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
FROM python:3.11-alpine
COPY --from=ghcr.io/astral-sh/uv:latest /uv /uvx /bin/
LABEL org.bitcart.image=docker-compose-generator
COPY . /app/generator
WORKDIR /app
COPY pyproject.toml uv.lock /app/
COPY generator /app/generator
ENV UV_COMPILE_BYTECODE=1
ENV UV_NO_CACHE=1
ENV UV_NO_SYNC=1
RUN uv sync --frozen --no-dev
ENV PATH="/app/.venv/bin:$PATH"
ENTRYPOINT [ "python3", "-m", "generator"]
10 changes: 10 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,2 +1,12 @@
[tool.uv.workspace]
members = ["generator"]

[tool.coverage.run]
source = ["."]
omit = [
"*__main__.py",
"generator/tests/**",
"venv/**",
"env/**",
"*__init__.py",
]

0 comments on commit c9c8315

Please sign in to comment.