diff --git a/.github/workflows/javascript.yaml b/.github/workflows/javascript.yaml index c09d5074c..3e39ecde9 100644 --- a/.github/workflows/javascript.yaml +++ b/.github/workflows/javascript.yaml @@ -16,7 +16,11 @@ jobs: uses: actions/setup-node@v1 with: node-version: '${{ matrix.node }}' - - name: Build - run: make build + - name: Install + run: npm install + - name: Lint via prettier check + run: npm run prettier-check + - name: Lint via eslint + run: npm run eslint - name: Test - run: make test + run: npm run test diff --git a/Dockerfile b/Dockerfile index 69f2fa5db..7037a03a6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -7,4 +7,3 @@ EXPOSE 8080 VOLUME /data COPY . . CMD ["node","bin/s3rver.js", "-p", "8080", "-d", "/data"] - diff --git a/Makefile b/Makefile deleted file mode 100644 index a485558a8..000000000 --- a/Makefile +++ /dev/null @@ -1,31 +0,0 @@ -IMAGE_NAME?=jamhall/s3rver -IMAGE_TAG?=latest - -.PHONY: lint -lint: - npm run eslint - npm run prettier-check - -.PHONY: build -build: - npm install - -.PHONY: test -test: - npm run test - -.PHONY: start -start: - nodejs ./bin/s3rver -d ./data - -.PHONY: build_docker -build_docker: - docker build -t ${IMAGE_NAME}:${IMAGE_TAG} . - -.PHONY: push_docker -push_docker: - docker build -t ${IMAGE_NAME}:${IMAGE_TAG} . - -.PHONY: start_docker -start_docker: - docker run -v $$PWD/data:/data -p 8080:8080 ${IMAGE_NAME}:${IMAGE_TAG} diff --git a/README.md b/README.md index 673989bed..32e485329 100644 --- a/README.md +++ b/README.md @@ -53,7 +53,7 @@ $ s3rver --help Build image ```bash -$ make build_docker +$ npm run docker:build ``` You will now have a image `jamhall/s3rver:latest` available. @@ -61,7 +61,7 @@ You will now have a image `jamhall/s3rver:latest` available. Executing this command to start server: ```bash -$ make start_docker +$ npm run docker:start ``` Server will listen on port `8080`. diff --git a/package.json b/package.json index 5996f7aa7..3eb4ac39a 100644 --- a/package.json +++ b/package.json @@ -28,7 +28,10 @@ "test": "mocha", "eslint": "eslint --ignore-path .gitignore .", "prettier": "prettier --ignore-path .gitignore \"**/*.{js,json,md}\"", - "format": "npm run eslint -- --fix && npm run prettier -- --write" + "format": "npm run eslint -- --fix && npm run prettier -- --write", + "docker:build": "docker build -t jamhall/s3rver:latest .", + "docker:push":"docker build -t jamhall/s3rver:latest .", + "docker:start": "docker run -v $(pwd)/data:/data -p 8080:8080 jamhall/s3rver:latest" }, "main": "lib/s3rver.js", "files": [