Port443 commited on
Commit
dea9fbb
·
verified ·
1 Parent(s): 16d8740

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +22 -22
Dockerfile CHANGED
@@ -1,39 +1,39 @@
1
- # Use Alpine-based Python image for a smaller image size
2
- FROM python:3.11-alpine
3
-
4
- # Metadata as described in your project
5
  LABEL name="Comet" \
6
  description="Stremio's fastest torrent/debrid search add-on." \
7
- url="https://github.com/g0ldyy/comet"
8
 
9
- # Set the working directory inside the container
10
- WORKDIR /app
11
 
12
- # Optionally define an environment variable for your database path
13
- ARG DATABASE_PATH
14
 
15
- # Environment variables for Python
16
  ENV PYTHONUNBUFFERED=1 \
17
  PYTHONDONTWRITEBYTECODE=1 \
 
 
18
  FORCE_COLOR=1 \
19
- TERM=xterm-256color
20
 
21
- # Install necessary build dependencies
22
  RUN apk add --no-cache \
23
  gcc \
24
  musl-dev \
25
  libffi-dev \
26
- make \
27
- python3-dev # Required for building some Python packages
 
 
 
 
28
 
29
- # Copy requirements.txt to the working directory
30
- COPY requirements.txt ./
31
 
32
- # Install dependencies from requirements.txt
33
- RUN pip install --no-cache-dir -r requirements.txt
34
 
35
- # Now copy the rest of your application code to the image
36
- COPY . .
 
37
 
38
- # Entrypoint to run the application
39
- ENTRYPOINT ["python", "-m", "comet.main"]
 
1
+ FROM python:3.11-alpine
 
 
 
2
  LABEL name="Comet" \
3
  description="Stremio's fastest torrent/debrid search add-on." \
4
+ url="https://github.com/g0ldyy/comet"
5
 
6
+ WORKDIR /app
 
7
 
8
+ ARG DATABASE_PATH
 
9
 
 
10
  ENV PYTHONUNBUFFERED=1 \
11
  PYTHONDONTWRITEBYTECODE=1 \
12
+ POETRY_NO_INTERACTION=1 \
13
+ POETRY_HOME="/usr/local" \
14
  FORCE_COLOR=1 \
15
+ TERM=xterm-256color
16
 
17
+ # Fix python-alpine gcc
18
  RUN apk add --no-cache \
19
  gcc \
20
  musl-dev \
21
  libffi-dev \
22
+ make
23
+
24
+ RUN pip install poetry
25
+
26
+ # Clear Poetry cache
27
+ RUN poetry cache clear --all pypoetry
28
 
29
+ # Disable virtual environment creation
30
+ RUN poetry config virtualenvs.create false
31
 
32
+ # Verify config
33
+ RUN poetry config --list
34
 
35
+ COPY . .
36
+ RUN mkdir -p data && chmod -R 777 data
37
+ RUN poetry install --no-cache --no-root --without dev
38
 
39
+ ENTRYPOINT ["poetry", "run", "python", "-m", "comet.main"]