diff options
| author | l3wdfut4pwr <l3wdfut4pwr@gmail.com> | 2026-03-14 16:36:41 +0200 |
|---|---|---|
| committer | l3wdfut4pwr <l3wdfut4pwr@gmail.com> | 2026-03-14 16:36:41 +0200 |
| commit | fb3a8d60228097dde6f6c71ea4a5dce1674e1fe1 (patch) | |
| tree | 025b5c5f9cc41ae06061db2c4b81f5ecdcd9163b | |
| parent | 5ec64487fb1b1fad2b9eb44ddd69f29bbdc8b09c (diff) | |
docker light test
| -rw-r--r-- | .dockerignore | 8 | ||||
| -rw-r--r-- | Dockerfile | 31 |
2 files changed, 26 insertions, 13 deletions
diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..0fdbb52 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,8 @@ +.git +.gitlab-ci.yml +__pycache__ +*.pyc +.env +tests +README.md +.ruff_cache @@ -1,25 +1,30 @@ -FROM python:3.14.3-slim +FROM python:3.14-slim -RUN apt-get update && apt-get install -y \ - curl \ - build-essential \ - && rm -rf /var/lib/apt/lists/* +WORKDIR /app -ENV POETRY_VERSION=2.3.2 -RUN curl -sSL https://install.python-poetry.org | python3 - +ENV PYTHONUNBUFFERED=1 -ENV PATH="/root/.local/bin:$PATH" +ENV POETRY_VERSION=2.3.2 \ + POETRY_NO_INTERACTION=1 \ + POETRY_VIRTUALENVS_CREATE=false + +RUN apt-get update \ + && apt-get install -y curl \ + && rm -rf /var/lib/apt/lists/* -WORKDIR /artberry_backend +RUN curl -sSL https://install.python-poetry.org | python3 + +ENV PATH="/root/.local/bin:$PATH" -COPY pyproject.toml poetry.lock* /artberry_backend/ +# install dependencies (docker cache layer) +COPY pyproject.toml poetry.lock* ./ RUN poetry install --no-root --only main -COPY . /artberry_backend +COPY . . -RUN chmod +x /artberry_backend/start.sh +RUN chmod +x start.sh EXPOSE 8000 -CMD ["/artberry_backend/start.sh"] +CMD ["./start.sh"] |
