add docker

This commit is contained in:
Amirhossein Mahmoodi
2024-11-13 13:40:34 +03:30
parent 9001739631
commit ee28594ee1
3 changed files with 21 additions and 1 deletions

5
.gitignore vendored
View File

@@ -35,4 +35,7 @@ ecosystem.config.js
public/config.json public/config.json
.vscode/ .vscode/
*.bundle
*.tar.gz

10
Dockerfile Normal file
View File

@@ -0,0 +1,10 @@
FROM node:21.1.0-alpine3.18
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"