Skip to content

Commit

Permalink
update configs
Browse files Browse the repository at this point in the history
  • Loading branch information
Clivern committed Aug 15, 2023
1 parent a1d7315 commit e4ef2e6
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 11 deletions.
8 changes: 0 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,20 +38,12 @@ jobs:

- name: Get dependencies
run: make deps
env:
DB_SSL: off

- name: Check gorilla format
run: make fmt_check
env:
DB_SSL: off

- name: Test gorilla
run: make ci
env:
DB_SSL: off

- name: Build gorilla
run: make build
env:
DB_SSL: off
Empty file added Dockerfile
Empty file.
2 changes: 1 addition & 1 deletion config/dev.exs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import Config

# Configure your database
if System.get_env("DB_SSL") == "on" do
if System.get_env("DB_SSL") || "off" == "on" do
config :gorilla, Gorilla.Repo,
username: System.get_env("DB_USERNAME") || "gorilla",
password: System.get_env("DB_PASSWORD") || "gorilla",
Expand Down
4 changes: 2 additions & 2 deletions config/runtime.exs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ end
if config_env() == :prod do
maybe_ipv6 = if System.get_env("ECTO_IPV6"), do: [:inet6], else: []

if System.get_env("DB_SSL") == "on" do
if System.get_env("DB_SSL") || "off" == "on" do
config :gorilla, Gorilla.Repo,
username: System.get_env("DB_USERNAME"),
password: System.get_env("DB_PASSWORD"),
Expand All @@ -40,7 +40,7 @@ if config_env() == :prod do
ssl: true,
ssl_opts: [
verify: :verify_peer,
cacertfile: System.get_env("DB_CA_CERTFILE_PATH")
cacertfile: System.get_env("DB_CA_CERTFILE_PATH") || ""
]
else
config :gorilla, Gorilla.Repo,
Expand Down

0 comments on commit e4ef2e6

Please sign in to comment.