version: "3.9" services: # git_sync: # image: registry.k8s.io/git-sync/git-sync:v4.0.0 # container_name: discord_git_sync # # Run as the standard TrueNAS 'apps' user (568) # user: "568:568" # environment: # GITSYNC_REPO: https://git.komawo.gay/Komino/FluxPoseDiscordBot.git # GITSYNC_BRANCH: master # GITSYNC_ROOT: /repo # # CRITICAL FIX: Aligned GITSYNC_DEST to match the bot's working_dir path # GITSYNC_DEST: FluxPoseDiscordBot.git # GITSYNC_WAIT: "10" # GITSYNC_USERNAME: Komino # GITSYNC_PASSWORD: 6c8fa6ce8214efe3b270e204ff63f56a2ae7e549 # # Ensure git-sync runs git commands as the correct user # GITSYNC_USER: "568" # # Fix permission issues on created files # GITSYNC_ADD_USER: "true" # # Force git-sync to change permissions on /repo to match user 568 # GITSYNC_PERMISSIONS_MODE: "0775" # volumes: # - ./FluxPoseDiscordBot:/repo:rw # restart: unless-stopped bot: image: mcr.microsoft.com/dotnet/sdk:9.0-alpine container_name: discord_bot # Matches standard TrueNAS 'apps' user user: "568:568" # This path now matches the GITSYNC_DEST above: /repo/FluxPoseDiscordBot.git working_dir: /repo # Use init process to forward signals and prevent "Failed down" errors init: true # Give dotnet watch time to shutdown cleanly stop_grace_period: 30s volumes: - ./FluxPoseDiscordBot:/repo:rw environment: BOT_TOKEN: MTQzOTk1MjIzMzAxMjY1ODI2Ng.GePLJF.ljh--yyvzz3Os5t8kZlhNnHnJuT-gQxpjGAgyA # Map HOME to a writable temporary location to avoid permission errors on /home/nonexistent HOME: /tmp DOTNET_CLI_HOME: /tmp # Required for reliable change detection in Docker DOTNET_USE_POLLING_FILE_WATCHER: "true" # Suppress dotnet welcome message and telemetry DOTNET_NOLOGO: "true" DOTNET_CLI_TELEMETRY_OPTOUT: "true" DOTNET_WATCH_RESTART_ON_RUDE_EDIT: "true" command: dotnet watch --project FluxPoseDiscordBot.csproj run # depends_on: # - git_sync restart: unless-stopped