Giter Site home page Giter Site logo

coverage-admin's Introduction

Build Setup

# install dependency
npm install

# develop
npm run dev

This will automatically open http://localhost:9528

Build

# build for test environment
npm run build:stage

# build for production environment
npm run build:prod

Advanced

# preview the release environment effect
npm run preview

# preview the release environment effect + static resource analysis
npm run preview -- --report

# code format check
npm run lint

# code format check and auto fix
npm run lint -- --fix

docker

https://nodejs.org/zh-cn/docs/guides/nodejs-docker-webapp

构建镜像

docker build . -t coverage-admin:v0.0.3 docker buildx build --platform linux/amd64 . -t coverage-admin:v0.0.3

运行容器

docker run -d -p 9001:9001 coverage-admin:v0.0.3

在 Docker 容器中挂载宿主机上的文件,需要正确配置挂载选项才能启用 birthtime 属性。具体而言,在 Linux 和 macOS 系统中,可以使用以下选项来挂载文件并启用 birthtime 属性: macOS 对于 macOS 的 HFS+ 和 APFS 文件系统,需要添加 bsdflags 和 noappledouble 选项: docker run -v /path/on/host:/path/in/container:ro,bsdflags=0x100000,noappledouble myimage

Get container ID

$ docker ps

Print app output

$ docker logs

Example

Running on http://localhost:8080

Kill our running container

$ docker kill

Confirm that the app has stopped

$ curl -i localhost:49160 curl: (7) Failed to connect to localhost port 49160: Connection refused

docker进入工作目录

docker exec -ti ec4d11930e1a13e46c2dfe7effb1b72c21f90840f2735047092e64b1fa3a5c08 /bin/bash

image hub push

docker tag coverage-admin:v0.0.3 alvinscrp/coverage-admin:v0.0.3 docker push alvinscrp/coverage-admin:v0.0.3

image hub pull

docker pull alvinscrp/coverage-admin:v0.0.3 docker run -p 9001:9001 -d alvinscrp/coverage-admin

nginx

conf位置:

vim /usr/local/etc/nginx/nginx.conf

设置全局配置指令

nginx -g /usr/local/etc/nginx/nginx.conf

检查Nginx配置文件是否正确命令:

./nginx -t

指定检测特定Nginx配置文件:-c表示configuration,指定配置文件 ./nginx -t -c /usr/local/etc/nginx/nginx.conf

Nginx服务器指定启动配置文件命令:

./nginx -c /usr/local/etc/nginx/nginx.conf

暴力停止Nginx服务器命令:

./nginx -s stop

优雅停止Nginx服务器命令:

./nginx -s quit

Nginx重新加载配置文件命令:

./nginx -s reload

Nginx重启

nginx -s reopen

pm2

重启服务

pm2 restart coverage-server

coverage-admin's People

Contributors

alvinscrp avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.