version: '3.8' services: file-transfer-go: build: . ports: - "8080:8080" environment: - NODE_ENV=production restart: unless-stopped healthcheck: test: ["CMD", "wget", "--quiet", "--tries=1", "--spider", "http://localhost:8080"] interval: 30s timeout: 10s retries: 3 start_period: 40s # 可选:使用已发布的镜像 # file-transfer-go: # image: matrixseven/file-transfer:latest # ports: # - "8080:8080" # restart: unless-stopped