add docker

This commit is contained in:
Amirhossein Mahmoodi
2024-11-12 13:20:36 +03:30
parent 99991bb841
commit 450f085286
3 changed files with 19 additions and 0 deletions

2
.gitignore vendored
View File

@@ -32,3 +32,5 @@ cypress/screenshots
.idea
package-lock.json
ecosystem.config.js
packages*.tar.gz

10
Dockerfile Normal file
View File

@@ -0,0 +1,10 @@
FROM node:22.11.0-alpine3.20
WORKDIR /var/www/app
COPY package*.json .
RUN npm install
COPY . .
CMD [ "tail", "-f", "/dev/null"]

7
docker-compose.yml Normal file
View File

@@ -0,0 +1,7 @@
services:
app:
build: .
volumes:
- .:/var/www/app
- /var/www/app/node_modules
command: sh -c "cd /var/www/app && tar -czvf packages_$(date +%Y_%m_%d).tar.gz node_modules"