前言
本系统为独立的用例管理系统,测试的小伙伴需要管理测试用例。记录一下部署过程。
项目地址
TestKiss
配置过程
修改config.py配置
SERVER_URL = 'http://外网IP:8080'
MONGO_URI = "mongodb"
初次运行mongodb启动和初始化
docker exec -it testkiss_python_1 bash
python init_mongo.py mongodb
基于docker部署
docker-compose.yml
version: "3"
networks:
tnet:
services:
python:
build:
context: .
dockerfile: ./docker/Dockerfile
network: host
volumes:
- ./backend:/app
- /var/log/testkiss/python/:/logs/
environment:
- "SET_CONTAINER_TIMEZONE=true"
- "TZ=Asia/Shanghai"
working_dir: /app
#command: python app.py
command: tail -f app.py
restart: unless-stopped
depends_on:
- mongodb
ports:
- "8080:8080"
networks:
- tnet
mongodb:
image: mongo:3.7
restart: always
environment:
- MONGO_DATA_DIR=/data/db
- MONGO_LOG_DIR=/data/logs
volumes:
- /data/testkiss/mongodb:/data/db
- /var/log/testkiss/mongodb:/data/logs
ports:
- "27017:27017"
networks:
- tnet
Dockerfile
FROM python:3.6.8
RUN mkdir /pip
ADD ./backend/requirements.txt /pip
RUN pip install --upgrade pip
RUN pip install -i https://mirrors.aliyun.com/pypi/simple/ -r /pip/requirements.txt
启动
docker-compose up -d
完整项目代码获取
完整代码+docker启动文件
评论 (0)