Skip to content
This repository was archived by the owner on Feb 10, 2025. It is now read-only.

Commit cbcbdda

Browse files
authored
chore: 简化docker-compose部署 (#466)
1 parent a2fcd31 commit cbcbdda

File tree

4 files changed

+7
-18
lines changed

4 files changed

+7
-18
lines changed

docker-compose/docker-compose.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,13 @@ services:
2525
# Socks代理端口,可选,和 SOCKS_PROXY_HOST 一起时生效
2626
SOCKS_PROXY_PORT: xxxx
2727
nginx:
28-
build: nginx
29-
image: chatgpt/nginx
28+
image: nginx:alpine
3029
ports:
3130
- '80:80'
3231
expose:
3332
- '80'
3433
volumes:
35-
- ./nginx/html/:/etc/nginx/html/
34+
- ./nginx/html:/usr/share/nginx/html
35+
- ./nginx/nginx.conf:/etc/nginx/conf.d/default.conf
3636
links:
3737
- app

docker-compose/nginx/Dockerfile

-10
This file was deleted.

docker-compose/nginx/nginx.conf

+3-3
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ server {
33
server_name localhost;
44
charset utf-8;
55
error_page 500 502 503 504 /50x.html;
6-
location = / {
7-
root /usr/share/nginx/html;
8-
index index.html index.htm;
6+
location / {
7+
root /usr/share/nginx/html;
8+
try_files $uri /index.html;
99
}
1010

1111
location /api {

docker-compose/readme.md

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
### docker-compose 部署教程
22
- 将打包好的前端文件放到 `nginx/html` 目录下
33
- ```shell
4-
# 打包启动
5-
docker-compose build
4+
# 启动
65
docker-compose up -d
76
```
87
- ```shell

0 commit comments

Comments
 (0)