Use docker to run the development enviroment (#3645)

* Use docker to run the development enviroment
* add --legacy-watch to nodemon commands

Co-authored-by: REJack <info@rejack.de>
This commit is contained in:
Leonardo Araoz 2021-09-17 16:31:46 -03:00 committed by GitHub
parent ab0ebc9a88
commit abd6f0c8c7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 29 additions and 2 deletions

4
.dockerignore Normal file
View File

@ -0,0 +1,4 @@
.git
*Dockerfile*
*docker-compose*
node_modules

12
Dockerfile Normal file
View File

@ -0,0 +1,12 @@
FROM node:14
WORKDIR /code
COPY package.json /code/package.json
COPY package-lock.json /code/package-lock.json
RUN npm install
COPY . /code
CMD ["npm", "run", "dev"]

11
docker-compose.yml Normal file
View File

@ -0,0 +1,11 @@
version: "3"
services:
admin:
build: .
command: npm run dev
ports:
- 3000:3000
- 3001:3001
volumes:
- .:/code
- /code/node_modules

View File

@ -39,8 +39,8 @@
"plugins": "node build/npm/Publish.js -v",
"sync": "browser-sync start --server --files *.html pages/ dist/",
"watch": "concurrently \"npm run watch-css\" \"npm run watch-js\"",
"watch-css": "nodemon --watch build/scss -e scss -x \"npm-run-all css-lint css\"",
"watch-js": "nodemon --watch build/js -e js -x \"npm-run-all js-lint js\""
"watch-css": "nodemon --legacy-watch --watch build/scss -e scss -x \"npm-run-all css-lint css\"",
"watch-js": "nodemon --legacy-watch --watch build/js -e js -x \"npm-run-all js-lint js\""
},
"keywords": [
"css",