docker-compose.yml 474 B

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