Update Dockerfile for correct directory structure
Browse files- Dockerfile +4 -3
Dockerfile
CHANGED
|
@@ -7,8 +7,8 @@ WORKDIR /app/web
|
|
| 7 |
# Copy package files first
|
| 8 |
COPY web/package.json web/yarn.lock ./
|
| 9 |
|
| 10 |
-
# Install dependencies
|
| 11 |
-
RUN yarn install --frozen-lockfile
|
| 12 |
|
| 13 |
# Copy web source files
|
| 14 |
COPY web/ .
|
|
@@ -38,12 +38,13 @@ COPY api/ /app/api/
|
|
| 38 |
WORKDIR /app/api
|
| 39 |
RUN pip install --no-cache-dir poetry && \
|
| 40 |
poetry config virtualenvs.create false && \
|
| 41 |
-
poetry install --
|
| 42 |
|
| 43 |
# Copy built web files from builder stage
|
| 44 |
COPY --from=web-builder /app/web/.next /app/web/.next
|
| 45 |
COPY --from=web-builder /app/web/public /app/web/public
|
| 46 |
COPY --from=web-builder /app/web/node_modules /app/web/node_modules
|
|
|
|
| 47 |
|
| 48 |
# Set environment variables
|
| 49 |
ENV FLASK_APP=app.py \
|
|
|
|
| 7 |
# Copy package files first
|
| 8 |
COPY web/package.json web/yarn.lock ./
|
| 9 |
|
| 10 |
+
# Install ALL dependencies (including dev dependencies) needed for build
|
| 11 |
+
RUN yarn install --frozen-lockfile
|
| 12 |
|
| 13 |
# Copy web source files
|
| 14 |
COPY web/ .
|
|
|
|
| 38 |
WORKDIR /app/api
|
| 39 |
RUN pip install --no-cache-dir poetry && \
|
| 40 |
poetry config virtualenvs.create false && \
|
| 41 |
+
poetry install --only main --no-interaction --no-ansi
|
| 42 |
|
| 43 |
# Copy built web files from builder stage
|
| 44 |
COPY --from=web-builder /app/web/.next /app/web/.next
|
| 45 |
COPY --from=web-builder /app/web/public /app/web/public
|
| 46 |
COPY --from=web-builder /app/web/node_modules /app/web/node_modules
|
| 47 |
+
COPY --from=web-builder /app/web/package.json /app/web/package.json
|
| 48 |
|
| 49 |
# Set environment variables
|
| 50 |
ENV FLASK_APP=app.py \
|