diff --git a/backend/Dockerfile b/backend/Dockerfile index 9bc321f9..3fe17c34 100644 --- a/backend/Dockerfile +++ b/backend/Dockerfile @@ -1,9 +1,14 @@ FROM python:3.11-alpine MAINTAINER ujwal.pachghare WORKDIR /usr/bin/app -ENV PIP_NO_CACHE_DIR=1 +ENV PIP_NO_CACHE_DIR=1 \ + FRONTEND_URL="http://127.0.0.1:3000" \ + BACKEND_URL="http://127.0.0.1:8000" \ + BE_ADMIN_EMAIL="admin@admin.com" \ + BE_ADMIN_PASSWORD="admin" \ + DJANGO_SECRET_KEY="YWRtaW4=" RUN rm -rf /var/lib/apt/lists/* -COPY ./dependencies.txt . +ADD dependencies.txt . RUN pip install --upgrade pip \ && pip install --no-cache-dir -r dependencies.txt COPY . . diff --git a/frontend/Dockerfile b/frontend/Dockerfile index d811ff0c..ca333172 100644 --- a/frontend/Dockerfile +++ b/frontend/Dockerfile @@ -1,7 +1,7 @@ FROM node:18.20.4-slim AS base LABEL stage="install" WORKDIR /install -COPY ./package.json . +COPY package.json . RUN npm install -g npm@10.9.0 RUN npm install @@ -18,8 +18,9 @@ FROM node:18.20-alpine LABEL stage="deploy" MAINTAINER ujwal.pachghare WORKDIR /usr/bin/app +ENV NEXT_PUBLIC_API_BASE_URL="http://127.0.0.1:8000" COPY --from=build /build/node_modules ./node_modules -COPY --from=build /build/pages ./pages +COPY --from=build /build/.next ./.next COPY . . EXPOSE 3000 CMD ["npm","start"]