diff --git a/Frontend/Dockerfile b/Frontend/Dockerfile index 24a53af..cf3754f 100644 --- a/Frontend/Dockerfile +++ b/Frontend/Dockerfile @@ -21,13 +21,20 @@ RUN useradd -s /bin/bash nonroot RUN mkdir -p /app RUN chown -R nonroot:nonroot /app WORKDIR /app + +# Copying contents COPY . . -RUN echo $BACKEND_URI > /app/.env + +# Writing backend uri in .env +RUN echo "VITE_API_URL = $BACKEND_URI" > /app/.env # Building frontend RUN npm install RUN npm run build +# Clean-up +RUN rm -rf eslint.config.js index.html node_modules/ package-lock.json package.json postcss.config.js public/ src/ tailwind.config.js vite.config.js .dockerignore .gitignore .vite/ + # Install server RUN npm install -g serve