- version: "3.8"
- services:
- go-msa-auth:
- build:
- context: .
- dockerfile: Dockerfile
- container_name: go-msa-auth
- ports:
- - "8080:8080" # 将容器的 8080 端口映射到宿主机
- volumes:
- - ./auth.db:/app/auth.db # 持久化数据库文件
- - ./data/json_files:/app/data/json_files # 挂载 JSON 文件目录
- environment:
- - CONFIG_PATH=/app/config.yaml # 配置文件路径(如果需要环境变量)
- restart: always
|