Git Product home page Git Product logo

test-platform's Introduction

测试平台

Docker 环境配置

  • redis
# 创建卷保存redis的持久化数据
docker volume create --driver local test-platform-redis-volume
# 使用自定义配置文件
# docker run -d --name test-platform-redis -v test-platform-redis-volume:/data -v /myredis/conf:/usr/local/etc/redis redis:6 redis-server --save 60 1 --loglevel warning
# 不使用自定义文件
docker run -d --name test-platform-redis -v test-platform-redis-volume:/data redis:6 redis-server --save 60 1 --loglevel warning
# 客户端
docker run -it --rm --link test-platform-redis:serverlink redis:6 redis-cli -h serverlink
# 进入容器
docker exec -it test-platform-redis bash
  • mysql
# 创建卷保存mysql的持久化数据
docker volume create --driver local test-platform-mysql-volume
# 使用自定义配置文件
# docker run -d --name test-platform-mysql -v test-platform-mysql-volume:/var/lib/mysql -v /my/custom:/etc/mysql/conf.d -e MYSQL_ROOT_PASSWORD=root123 mysql:5.7
# 不使用自定义文件
docker run -d --name test-platform-mysql -v test-platform-mysql-volume:/var/lib/mysql -e MYSQL_ROOT_PASSWORD=root123 mysql:5.7
# 客户端
docker run -it --rm --link test-platform-mysql:serverlink mysql:5.7 mysql -hserverlink -uroot -p
# 进入容器
docker exec -it test-platform-mysql bash
# 查看帮助
docker run -it --rm mysql:5.7 --verbose --help
  • APP
# 构建镜像
docker build -t test-platform:latest .
# 运行容器
docker run -d -p 8080:8080 --name test-platform-app --link test-platform-mysql:mysql --link test-platform-redis:redis test-platform:latest
# 查看日志
docker logs -f test-platform-app

test-platform's People

Watchers

Chen 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.