From c77d44676c1438846cf6264713dcce314c89fa4a Mon Sep 17 00:00:00 2001 From: Mohamed Ali Date: Tue, 9 Jan 2024 01:40:15 +0200 Subject: [PATCH] update --- Dockerfile | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) diff --git a/Dockerfile b/Dockerfile index 1ea5f11..f59cfa0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,30 +1,13 @@ FROM node:16 -# Set working directory WORKDIR /app -# Copy package.json and package-lock.json COPY package*.json ./ -# Install dependencies RUN npm install -# Copy the rest of the application files COPY . . -# Expose the application port EXPOSE 2000 -# Install Redis server -RUN apt-get update && \ - apt-get install -y redis-server && \ - rm -rf /var/lib/apt/lists/* - -# Configure Redis to listen on port 6377 without a password -RUN sed -i 's/^bind .*$/bind 0.0.0.0/' /etc/redis/redis.conf && \ - sed -i 's/^protected-mode yes$/protected-mode no/' /etc/redis/redis.conf && \ - sed -i 's/^port 6379$/port 6377/' /etc/redis/redis.conf && \ - sed -i '/^requirepass/ s/^/#/' /etc/redis/redis.conf - -# Start Redis server and then the Node.js application -CMD ["bash", "-c", "redis-server --daemonize yes && npm start"] +CMD ["npm","start"]