docker-compose.yml 459 B

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