# quick setup tlias dev env **Repository Path**: bl-sun/quick-setup-tlias-dev-env ## Basic Information - **Project Name**: quick setup tlias dev env - **Description**: 用来快速配置tlias项目的开发环境,这里的开发环境指的前端和数据库。 - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2023-08-17 - **Last Updated**: 2023-09-06 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # 一键启动tlias员工管理系统的开发环境 本项目用于快速配置[https://gitee.com/lei2019/tlias-web](https://gitee.com/lei2019/tlias-web)tlias后端项目的前端和数据库环境 ## 1 requirment - docker - docker-compose - this repo ```sh git clone url ``` ## 2 快速尝鲜 ### step1 克隆本仓库并启动写好的服务 ```sh git clone https://gitee.com/lei2019/quick-setup-tlias-dev-env.git cd quick-setup-tlias-dev-env docker compose up -d ``` **!!!恭喜你当前项目已经启动成功啦!!!** 此时就可以访问`localhost:90`的nginx和链接`root@localhost:3306`的mysql数据库 因为本项目是配合[https://gitee.com/lei2019/tlias-web](https://gitee.com/lei2019/tlias-web)这个后端项目的。后端项目中已经配置了相应的参数,如果要改变数据库和前端其中的参数,在后端项目中也要做相应的修改 ### step2 克隆后端项目并启动 ```sh git clone https://gitee.com/lei2019/tlias-web.git ``` idea 导入克隆下来的module 启动后端项目(执行main方法) ### step3 浏览器访问`localhost:90` 成功展示页面,并能在`系统信息管理`下查看`部门管理`和`员工管理` ### step4 暂停服务 重启服务 ```sh docker compose stop ``` 使用上面的命令停止服务,但不会删除容器,下次启动的时候更快。 上面停止的服务可以使用下面这条命令重启 ```sh docker compose start ``` ### step5 清除服务 ```sh docker compose down # 当前项目中会生成tlias-database用来存储mysql的数据 docker volume rm tlias-database ``` 当前项目中构建的镜像 ```sh docker rmi tlias-database:1.0 ``` 当前项目中引用的镜像 ```sh docker rmi mysql:5.7 nginx:1.25.2 ``` ## 3 Usage ### 配置并启动服务 ```sh docker compose up -d # -d 后台启动 ``` ### 关闭并删除服务 ```sh docker compose down ``` ### 暂停服务 ```sh docker compose stop ``` ### 启动服务 ```sh docker compose start ``` ### clear all ```sh docker compose rm ``` 由于当前mysql的数据挂载到了docker的数据卷中,所以需要使用下面命令清除无用的数据卷 ```sh docker volume prune ```