Skip to content

Commit

Permalink
Config fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
ericmj committed Jan 12, 2025
1 parent d1812e1 commit ce08a6e
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 31 deletions.
30 changes: 0 additions & 30 deletions config/releases.exs

This file was deleted.

32 changes: 32 additions & 0 deletions config/runtime.exs
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
import Config

if config_env() == :prod do
jobs_fun = fn env ->
{result, _bindings} = Code.eval_string(System.fetch_env!(env))
result
end

config :bob,
github_user: System.fetch_env!("BOB_GITHUB_USER"),
github_token: System.fetch_env!("BOB_GITHUB_TOKEN"),
dockerhub_username: System.get_env("BOB_DOCKERHUB_USERNAME"),
dockerhub_password: System.get_env("BOB_DOCKERHUB_PASSWORD"),
agent_secret: System.fetch_env!("BOB_AGENT_SECRET"),
master_url: System.fetch_env!("BOB_MASTER_URL"),
master?: System.fetch_env!("BOB_WHO") == "master",
parallel_jobs: String.to_integer(System.fetch_env!("BOB_PARALLEL_JOBS")),
local_jobs: jobs_fun.("BOB_LOCAL_JOBS"),
remote_jobs: jobs_fun.("BOB_REMOTE_JOBS")

config :ex_aws,
access_key_id: System.fetch_env!("BOB_S3_ACCESS_KEY"),
secret_access_key: System.fetch_env!("BOB_S3_SECRET_KEY")

config :sentry,
dsn: System.fetch_env!("BOB_SENTRY_DSN"),
environment_name: System.fetch_env!("BOB_ENV"),
tags: %{
bob_who: System.fetch_env!("BOB_WHO"),
bob_hostname: System.fetch_env!("BOB_HOSTNAME")
}
end
5 changes: 4 additions & 1 deletion mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,10 @@ defmodule Bob.Mixfile do

defp releases() do
[
bob: [include_executables_for: [:unix]]
bob: [
include_executables_for: [:unix],
reboot_system_after_config: true
]
]
end
end

0 comments on commit ce08a6e

Please sign in to comment.