File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -27,11 +27,11 @@ WORKDIR /app
2727COPY --from=build /bin/flashduty-runner .
2828
2929# Set environment variables
30- ENV FLASHDUTY_API_KEY =""
31- ENV FLASHDUTY_API_URL ="wss://api.flashcat.cloud/runner/ws"
30+ ENV FLASHDUTY_RUNNER_API_KEY =""
31+ ENV FLASHDUTY_RUNNER_API_URL ="wss://api.flashcat.cloud/runner/ws"
3232ENV FLASHDUTY_RUNNER_NAME=""
33- ENV FLASHDUTY_WORKSPACE_ROOT ="/workspace"
34- ENV FLASHDUTY_AUTO_UPDATE ="false"
33+ ENV FLASHDUTY_RUNNER_WORKSPACE_ROOT ="/workspace"
34+ ENV FLASHDUTY_RUNNER_AUTO_UPDATE ="false"
3535
3636# Create workspace directory
3737VOLUME ["/workspace" ]
Original file line number Diff line number Diff line change @@ -106,6 +106,15 @@ func Load(configPath string) (*Config, error) {
106106 v .SetEnvKeyReplacer (strings .NewReplacer ("." , "_" ))
107107 v .AutomaticEnv ()
108108
109+ // Explicitly bind environment variables (required for AutomaticEnv to work without config file)
110+ _ = v .BindEnv ("api_key" )
111+ _ = v .BindEnv ("api_url" )
112+ _ = v .BindEnv ("name" )
113+ _ = v .BindEnv ("workspace_root" )
114+ _ = v .BindEnv ("auto_update" )
115+ _ = v .BindEnv ("log.level" )
116+ _ = v .BindEnv ("log.format" )
117+
109118 // Unmarshal into config struct
110119 if err := v .Unmarshal (cfg ); err != nil {
111120 return nil , fmt .Errorf ("failed to unmarshal config: %w" , err )
You can’t perform that action at this time.
0 commit comments