-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #187 from alwinsimon/docker-configuration
Docker configuration
- Loading branch information
Showing
4 changed files
with
68 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
node_modules/* | ||
.env |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# ===================Server Port=================== | ||
PORT = 3000 | ||
|
||
|
||
# ===================MongoDB Url=================== | ||
MONGO_DB_URL = 'Paste mongodb url here' | ||
|
||
|
||
# ===================Platform Name=================== | ||
PLATFORM_NAME = 'GetMyDeal' | ||
|
||
|
||
# ===================Cookiee Key=================== | ||
SESSION_SECRET_KEY = 'Paste SESSION-SECRET-KEY here' | ||
|
||
|
||
# ===================Payment Gateway Credentials - Razorpay=================== | ||
RAZORPAY_KEY_ID = "Paste RAZORPAY_KEY_ID here" | ||
|
||
RAZORPAY_SECRET_KEY = "Paste RAZORPAY_SECRET_KEY here" | ||
|
||
|
||
# ===================OTP Verification Service Credentials - Twilio =================== | ||
TWILIO_ACCOUNT_SID = "Paste TWILIO_ACCOUNT_SID here" | ||
|
||
TWILIO_AUTH_TOKEN = "Paste TWILIO_AUTH_TOKEN here" | ||
|
||
TWILIO_VERIFY_SID = "Paste TWILIO_VERIFY_SID here" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# Command to configure the base image (official Node.js base image) | ||
FROM node:18.16 | ||
|
||
# Command to update the base image | ||
RUN apt update | ||
|
||
# Set the working directory for the container | ||
WORKDIR /app | ||
|
||
# Command to copy the package files to working direcotory of the container | ||
COPY package*.json . | ||
|
||
# Install dependencies inside the container | ||
RUN npm install | ||
|
||
# Copy all the files from the existing directory to the docker container | ||
COPY . . | ||
|
||
# Command to set a fixed port for container to listen (exposing a port) | ||
EXPOSE 3000 | ||
|
||
# Specify the default command to run the application inside the container | ||
CMD ["npm", "start"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
version: "3" | ||
services: | ||
webserver: | ||
build: | ||
dockerfile: Dockerfile | ||
context: ./ | ||
image: webserver-image:v1 # This will set the image name and tag while building the image from dockerfile using docker compose | ||
container_name: webserver # This will set the container name while starting it from docker compose | ||
ports: | ||
- 3000:3000 | ||
restart: on-failure | ||
# volumes: | ||
# - .:/app | ||
env_file: | ||
- ./.env |