This commit is contained in:
Adolfo Reyna
2024-10-16 16:22:55 -04:00
2 changed files with 27 additions and 1 deletions

26
Dockerfile Normal file
View File

@@ -0,0 +1,26 @@
# Use an official Node.js runtime as a parent image
FROM node:18-alpine
# Install Python, make, and g++ to allow native module compilation
RUN apk add --no-cache python3 make g++
# Set the working directory inside the container
WORKDIR /app
# Copy package.json and package-lock.json to the working directory
COPY package*.json ./
# Install dependencies
RUN npm install
# Copy the rest of the application source code
COPY . .
# Expose the port your Express app runs on
EXPOSE 3001
# Command to run your app
CMD ["npm", "start"]
# sudo docker build -t emi-backend .
# sudo docker run -d -p 4000:5000 -e PORT=5000 emi-backend

View File

@@ -22,7 +22,7 @@ const webPushEmail = process.env.WEB_PUSH_EMAIL;
webPush.setVapidDetails('mailto:' + webPushEmail, publicVapidKey, privateVapidKey); webPush.setVapidDetails('mailto:' + webPushEmail, publicVapidKey, privateVapidKey);
var corsOptions = { var corsOptions = {
origin: ['http://localhost:8080', "https://social.emmint.com", "https://fellowship.emmint.com"], origin: ['http://localhost:8080', 'http://localhost:3000', "https://social.emmint.com", "https://fellowship.emmint.com"],
credentials: true credentials: true
}; };