diff --git a/.dockerignore b/.dockerignore index 11420c7..90e4656 100644 --- a/.dockerignore +++ b/.dockerignore @@ -2,4 +2,13 @@ node_modules .git .gitignore .env.example -.env \ No newline at end of file +config/.env +project-ops +Dockerfile +*.md +*.yml +*.log +*.service +*.conf +LICENSE +*.yaml \ No newline at end of file diff --git a/.gitignore b/.gitignore index 5f53513..9f224d1 100644 --- a/.gitignore +++ b/.gitignore @@ -79,11 +79,11 @@ web_modules/ .yarn-integrity # dotenv environment variable files -.env -.env.development.local -.env.test.local -.env.production.local -.env.local +config/.env +config/.env.development.local +config/.env.test.local +config/.env.production.local +config/.env.local # parcel-bundler cache (https://parceljs.org/) .cache diff --git a/README.md b/README.md index d5cb18f..f47a3b8 100644 --- a/README.md +++ b/README.md @@ -48,7 +48,7 @@ cd project-quiz-app npm install ``` ### Set up environment variables: - Create a .env file in the root directory and configure the following: + Create a .env file in the ./config/ directory and configure the following or use .env.example: ``` -MONGO_ATLAS="mongodb://localhost:27017/testdb" diff --git a/project-ops/Readme.md b/project-ops/Readme.md new file mode 100644 index 0000000..e69de29 diff --git a/deploy-pod.yml b/project-ops/dev/k8s/dev-combined.yml similarity index 100% rename from deploy-pod.yml rename to project-ops/dev/k8s/dev-combined.yml diff --git a/project-ops/prod/k8s/deployments/app-deployment.yml b/project-ops/prod/k8s/deployments/app-deployment.yml new file mode 100644 index 0000000..e69de29 diff --git a/project-ops/prod/k8s/deployments/db-deployment.yml b/project-ops/prod/k8s/deployments/db-deployment.yml new file mode 100644 index 0000000..e69de29 diff --git a/project-ops/prod/k8s/services/ingress.yml b/project-ops/prod/k8s/services/ingress.yml new file mode 100644 index 0000000..e69de29 diff --git a/src/index.js b/src/index.js index 217c0ab..5a90025 100644 --- a/src/index.js +++ b/src/index.js @@ -1,7 +1,9 @@ const express=require("express") const app=express() const cors=require('cors') -require('dotenv').config() +require('dotenv').config({ + path: './config/.env' +}) const bodyParser=require('body-parser') const logger=require('./config/logger') const {databaseConnection}=require('./config/db')