Skip to content

Commit

Permalink
WIP - set up dev dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
moleculekayak committed Dec 19, 2024
1 parent b2628da commit e4be04c
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 5 deletions.
6 changes: 2 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,11 @@ FROM python:3.11-slim-buster

WORKDIR /app

COPY pyproject.toml docker_start ./
COPY src src
COPY docker_start ./

RUN apt-get update \
&& echo "----- Installing python requirements" \
&& pip install uv \
&& uv pip install -r pyproject.toml --system --all-extras \
# TODO: install fertilizer from pip
&& echo "----- Preparing directories" \
&& mkdir /config /data /torrents \
&& echo "----- Cleanup" \
Expand Down
21 changes: 21 additions & 0 deletions Dockerfile.dev
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
FROM python:3.11-slim-buster

WORKDIR /app

COPY pyproject.toml docker_start ./
COPY src src

RUN apt-get update \
&& echo "----- Installing python requirements" \
&& pip install uv \
&& uv pip install -r pyproject.toml --system --all-extras \
&& uv pip install -e . --system \
&& echo "----- Preparing directories" \
&& mkdir /config /data /torrents \
&& echo "----- Cleanup" \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*

EXPOSE 9713

ENTRYPOINT ["./docker_start"]
2 changes: 1 addition & 1 deletion docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ services:
fertilizer:
build:
context: .
dockerfile: ./Dockerfile
dockerfile: ./Dockerfile.dev
volumes:
- '.:/app'
ports:
Expand Down

0 comments on commit e4be04c

Please sign in to comment.