Skip to content

Commit

Permalink
chore: 简化docker-compose部署 (#466)
Browse files Browse the repository at this point in the history
  • Loading branch information
cloudGrin authored Mar 10, 2023
1 parent a2fcd31 commit cbcbdda
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 18 deletions.
6 changes: 3 additions & 3 deletions docker-compose/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,13 @@ services:
# Socks代理端口,可选,和 SOCKS_PROXY_HOST 一起时生效
SOCKS_PROXY_PORT: xxxx
nginx:
build: nginx
image: chatgpt/nginx
image: nginx:alpine
ports:
- '80:80'
expose:
- '80'
volumes:
- ./nginx/html/:/etc/nginx/html/
- ./nginx/html:/usr/share/nginx/html
- ./nginx/nginx.conf:/etc/nginx/conf.d/default.conf
links:
- app
10 changes: 0 additions & 10 deletions docker-compose/nginx/Dockerfile

This file was deleted.

6 changes: 3 additions & 3 deletions docker-compose/nginx/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ server {
server_name localhost;
charset utf-8;
error_page 500 502 503 504 /50x.html;
location = / {
root /usr/share/nginx/html;
index index.html index.htm;
location / {
root /usr/share/nginx/html;
try_files $uri /index.html;
}

location /api {
Expand Down
3 changes: 1 addition & 2 deletions docker-compose/readme.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
### docker-compose 部署教程
- 将打包好的前端文件放到 `nginx/html` 目录下
- ```shell
# 打包启动
docker-compose build
# 启动
docker-compose up -d
```
- ```shell
Expand Down

0 comments on commit cbcbdda

Please sign in to comment.