Skip to content

Commit

Permalink
fix(nossas): change order in build to install requirements
Browse files Browse the repository at this point in the history
  • Loading branch information
igr-santos committed Nov 1, 2024
1 parent 9ea9482 commit d73adb8
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions app/org_nossas/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ FROM node:18-alpine AS node-builder

WORKDIR /app

# TODO: Copiar apenas arquivos para o build do node
COPY . .

WORKDIR /app/tailwind
Expand Down Expand Up @@ -43,16 +44,18 @@ RUN apt-get update --yes --quiet && apt-get install --yes --quiet --no-install-r
# Install the application server.
RUN pip install uwsgi django-storages boto3 django-prometheus

# Install the project requirements.
# COPY org_nossas/requirements.txt /
RUN pip install -r org_nossas/requirements.txt

# Use /app folder as a directory where the source code is stored.
WORKDIR /app

# Copy the source code of the project into the container.
COPY --from=node-builder /app ./

# Install the project requirements.
# Os arquivos do projeto foram copiados em sua totalidade no node-builder e por esse motivo
# essa linha precisa ser executada após trazer os arquivos do node-builder pra esse stage
# em Python
RUN pip install -r org_nossas/requirements.txt

RUN python manage.py collectstatic --noinput --clear -i tailwindcss

# Runtime command that executes when "docker run" is called.
Expand Down

0 comments on commit d73adb8

Please sign in to comment.