文件
Clone or Download
docker-compose.yml 679 Bytes
Copy Edit Raw Blame History
canace authored 2 years ago . first commit
version: '3'
services:
mysql:
image: mysql:8
container_name: api-go-mysql
restart: always
ports:
- 3306:3306
environment:
MYSQL_ROOT_PASSWORD: qwerdfb
volumes:
- /tmp/api-go/mysql/data:/var/lib/mysql
redis:
image: redis:6
container_name: api-go-redis
restart: always
ports:
- 6379:6379
volumes:
- /tmp/api-go/redis/data:/data
api-go:
container_name: api-go
build: .
depends_on:
- mysql
- redis
environment:
- MYSQL_URL=root:qwerdfb@tcp(mysql:3306)/api_go?charset=utf8mb4&parseTime=True&loc=Local
- REDIS_URL=redis://redis:6379/0
ports:
- 8000:8000
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化