version: '3.8' services: code-server: image: codercom/code-server:latest container_name: code-server restart: unless-stopped environment: # GitHub OAuth 認證 OAUTH_CLIENT_ID: ${OAUTH_CLIENT_ID} OAUTH_CLIENT_SECRET: ${OAUTH_CLIENT_SECRET} OAUTH_AUTHORIZE_URL: https://github.com/login/oauth/authorize OAUTH_TOKEN_URL: https://github.com/login/oauth/access_token OAUTH_USER_ID_TOKEN_CLAIM: login volumes: # 程式碼目錄 - /mnt/data/External/code:/home/coder/project # VSCode 設定 - code-server-config:/home/coder/.config # 快取 - code-server-cache:/home/coder/.cache ports: - "6800:8443" networks: - webproxy healthcheck: test: ["CMD", "curl", "-f", "http://localhost:8443"] interval: 30s timeout: 10s retries: 3 volumes: code-server-config: code-server-cache: networks: webproxy: external: true