Skip to content

Commit ea94bfc

Browse files
committed
feat: add doc front-backend-docker-deployment.md
1 parent 7a9f9ad commit ea94bfc

3 files changed

Lines changed: 44 additions & 0 deletions

File tree

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# 前端及Java服务端docker部署到服务器
2+
3+
## 1、环境准备
4+
- **工具安装**
5+
6+
根据自己的linux操作系统安装docker,配置国内镜像加速,在对应目录编辑daemon.json文件镜像地址,如图
7+
8+
![](./imgs/daemon.png)
9+
编辑完成后重载配置重启docker
10+
```sh
11+
sudo systemctl daemon-reload
12+
sudo systemctl restart docker
13+
```
14+
docker-compose安装
15+
```sh
16+
sudo curl -L "https://ghproxy.com/https://github.com/docker/compose/releases/latest/download/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
17+
sudo chmod +x /usr/local/bin/docker-compose
18+
```
19+
- **拉取代码**
20+
```sh
21+
git clone -b develop https://github.com/opentiny/tint-engine.git
22+
git clone -b develop https://github.com/opentiny/tiny-engine-backend-java.git
23+
```
24+
## 2、配置修改
25+
- **nginx配置修改**
26+
27+
修改 Java 项目 /tiny-engine-backend-java/docker-deploy-data/nginx.conf 文件,如图所示将ip改为自己服务器ip或域名
28+
![](./imgs/nginxcof.png)
29+
30+
## 3、服务启动与停止
31+
32+
- **服务启动**
33+
34+
在 Java 项目根目录 docker-compose.yml 文件同级执行命令
35+
```sh
36+
docker-compose up -d
37+
```
38+
- **服务停止**
39+
40+
```sh
41+
docker-compose stop
42+
```
43+
## 4、视频讲解
44+
- [TinyEngine实操教程(4)——前后端部署](https://www.bilibili.com/video/BV1gGgcz8Eek/?spm_id_from=333.1387.homepage.video_card.click&vd_source=ea0e34d0a465d263673f7f36dcae0edf)

docs/solutions/imgs/daemon.PNG

98.7 KB
Loading

docs/solutions/imgs/nginxcof.PNG

161 KB
Loading

0 commit comments

Comments
 (0)