内容简介:weatherApi by openweathermapbuild images and start containercheck images and container
weatherApi
weatherApi by openweathermap
Requirement:
- install yarn
- install node (v12+)
- install mongodb
Testing and run:
$ yarn // development $ yarn run dev // production $ yarn run start // run test case $ yarn run test // use eslint and prettier to format code $ yarn run lint
Docker:
- Dockerfile
build images and start container
docker build -t <username>/weather-api:<tag> . docker run -p 3000:3000 -d <username>/weather-api:<tag> docker exec -it <containerId> /bin/bash docker logs <containerId>
check images and container
docker images docker ps docker ps -a
open localhost:3000
- docker-compose.yml
build images and start container
docker-compose build docker-compose up
build images and start container in one line
docker-compose up -d --build
stop container
docker-compose stop
add tag to docker images
$ docker tag <imageId> <dockerHubUserName>/<imageName>:<tag>
push docker images to docker hub
$ docker push <dockerHubUserName>/<imageName>:<tag>
open localhost:3000
Contributing
Please refer to CONTRIBUTING.md
以上就是本文的全部内容,希望本文的内容对大家的学习或者工作能带来一定的帮助,也希望大家多多支持 码农网
猜你喜欢:本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们。
HTML 编码/解码
HTML 编码/解码
正则表达式在线测试
正则表达式在线测试