重构后端服务架构并优化前端错误处理
This commit is contained in:
33
go-backend/docker-compose.yml
Normal file
33
go-backend/docker-compose.yml
Normal file
@@ -0,0 +1,33 @@
|
||||
version: '3.8'
|
||||
|
||||
services:
|
||||
app:
|
||||
build: .
|
||||
ports:
|
||||
- "8080:8080"
|
||||
environment:
|
||||
- DB_HOST=db
|
||||
- DB_PORT=3306
|
||||
- DB_USER=root
|
||||
- DB_PASSWORD=rootpassword
|
||||
- DB_NAME=niumall
|
||||
- PORT=8080
|
||||
- GIN_MODE=release
|
||||
- JWT_SECRET=mysecretkey
|
||||
depends_on:
|
||||
- db
|
||||
volumes:
|
||||
- .env:/root/.env
|
||||
|
||||
db:
|
||||
image: mysql:8.0
|
||||
environment:
|
||||
- MYSQL_ROOT_PASSWORD=rootpassword
|
||||
- MYSQL_DATABASE=niumall
|
||||
ports:
|
||||
- "3306:3306"
|
||||
volumes:
|
||||
- db_data:/var/lib/mysql
|
||||
|
||||
volumes:
|
||||
db_data:
|
||||
Reference in New Issue
Block a user