tfrere commited on
Commit
a624c63
·
1 Parent(s): 31afc96
Files changed (1) hide show
  1. Dockerfile +9 -13
Dockerfile CHANGED
@@ -15,27 +15,23 @@ RUN apt-get update && apt-get install -y \
15
  curl \
16
  && rm -rf /var/lib/apt/lists/*
17
 
18
- # Install Poetry
19
- RUN curl -sSL https://install.python-poetry.org | python3 -
 
20
 
21
- # Copy project files
22
- COPY . .
23
 
24
- # Configure Poetry
25
  RUN poetry config virtualenvs.create false \
26
  && poetry install --no-interaction --no-ansi --only main --no-root
27
 
 
 
 
28
  # Create non-root user
29
  RUN useradd -m -u 1000 user
30
 
31
- # Copy and install Python dependencies
32
- COPY server/pyproject.toml server/poetry.lock* ./
33
- RUN poetry config virtualenvs.create false \
34
- && poetry install --no-interaction --no-ansi --only main --no-root
35
-
36
- # Copy server code
37
- COPY server/ ./server/
38
-
39
  # Copy client build
40
  COPY --from=client-build /app/dist ./static
41
 
 
15
  curl \
16
  && rm -rf /var/lib/apt/lists/*
17
 
18
+ # Install Poetry and add it to PATH
19
+ RUN curl -sSL https://install.python-poetry.org | python3 - \
20
+ && ln -s /root/.local/bin/poetry /usr/local/bin/poetry
21
 
22
+ # Copy Python dependencies files first
23
+ COPY server/pyproject.toml server/poetry.lock* ./
24
 
25
+ # Configure Poetry and install dependencies
26
  RUN poetry config virtualenvs.create false \
27
  && poetry install --no-interaction --no-ansi --only main --no-root
28
 
29
+ # Copy the rest of the application
30
+ COPY . .
31
+
32
  # Create non-root user
33
  RUN useradd -m -u 1000 user
34
 
 
 
 
 
 
 
 
 
35
  # Copy client build
36
  COPY --from=client-build /app/dist ./static
37