Fixed a major issue in building docker image for backend where the env file was not being copied which resulted in backend not working!
This commit is contained in:
@@ -1,3 +1,6 @@
|
|||||||
Dockerfile
|
Dockerfile
|
||||||
node_modules/
|
node_modules/
|
||||||
package-lock.json
|
package-lock.json
|
||||||
|
.dockerignore
|
||||||
|
.env.back
|
||||||
|
.gitignore
|
||||||
|
|||||||
@@ -0,0 +1,25 @@
|
|||||||
|
PORT = 8000
|
||||||
|
FRONTEND_URI = ${FRONTEND_URI}
|
||||||
|
|
||||||
|
# Database
|
||||||
|
MONGODB_URI = ${MONGODB_URI}
|
||||||
|
DATABASE_NAME=CropCompass
|
||||||
|
|
||||||
|
# Mail server
|
||||||
|
SMPT_SERVICE = ${SMTP_SERVICE}
|
||||||
|
SMPT_MAIL = ${SMTP_EMAILADDR}
|
||||||
|
SMPT_PASSWORD = ${SMTP_PASSWORD}
|
||||||
|
HOST = ${SMTP_HOST}
|
||||||
|
EMAIL_PORT = ${SMTP_PORT}
|
||||||
|
|
||||||
|
# Cloudinary
|
||||||
|
CLOUDINARY_CLOUD_NAME = ${CLOUDINARY_CLOUD_NAME}
|
||||||
|
CLOUDINARY_API_KEY = ${CLOUDINARY_API_KEY}
|
||||||
|
CLOUDINARY_API_SECRET = ${CLOUDINARY_API_SECRET}
|
||||||
|
|
||||||
|
# Gemini
|
||||||
|
GEMINI_API_KEY = ${GEMINI_API_KEY}
|
||||||
|
|
||||||
|
# Refresh token
|
||||||
|
TOKEN_NAME = uid
|
||||||
|
REFRESH_TOKEN_EXPIRY = 10d
|
||||||
+1
-1
@@ -19,7 +19,7 @@ node_modules/
|
|||||||
jspm_packages/
|
jspm_packages/
|
||||||
|
|
||||||
# Environment files
|
# Environment files
|
||||||
.env
|
.env.bak
|
||||||
.env.*.local
|
.env.*.local
|
||||||
|
|
||||||
# Build outputs
|
# Build outputs
|
||||||
|
|||||||
+1
-1
@@ -20,7 +20,7 @@ WORKDIR /app
|
|||||||
COPY . .
|
COPY . .
|
||||||
|
|
||||||
# Generate a random hex token and write it to .env
|
# Generate a random hex token and write it to .env
|
||||||
RUN echo "REFRESH_TOKEN_SECRET=$(openssl rand -hex 32)" >> /app/.env
|
RUN echo "REFRESH_TOKEN_SECRET = $(openssl rand -hex 32)" >> /app/.env
|
||||||
RUN npm install
|
RUN npm install
|
||||||
|
|
||||||
# Switch user
|
# Switch user
|
||||||
|
|||||||
Reference in New Issue
Block a user