diff --git a/Dockerfile b/Dockerfile index 36945f3..d61bb9e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,5 @@ -FROM node:alpine +FROM node:22 # Create app directory WORKDIR /usr/src/app @@ -8,12 +8,12 @@ WORKDIR /usr/src/app # A wildcard is used to ensure both package.json AND package-lock.json are copied #RUN npm install -g nodaemon -COPY package*.json /usr/src/app/ -RUN npm install +#COPY package*.json . +#RUN npm install #UN npm install -g nodaemon -COPY . /usr/src/app/ -#RUN npm install +COPY . . +RUN npm install EXPOSE 8080 diff --git a/docker-compose.yml b/docker-compose.yml index c04c03c..f4fd2bf 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,11 +1,11 @@ services: app: build: . - volumes: - - .:/usr/src/app - container_name: docker-node-tut + # volumes: +# - .:/usr/src/app + container_name: docker-aps restart: always ports: - - 127.0.0.1:8080:8080 - command: sh -c /usr/src/app/start.sh + - 127.0.0.1:8067:8080 + command: npm run start env_file: .env diff --git a/start.sh b/start.sh old mode 100644 new mode 100755