File tree Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -51,8 +51,21 @@ if config_env() == :prod do
51
51
maybe_ipv6 = if System . get_env ( "ECTO_IPV6" ) , do: [ :inet6 ] , else: [ ]
52
52
use_db_ssl = System . get_env ( "USE_DB_SSL" ) == "1"
53
53
54
+ db_ssl_opts =
55
+ if System . get_env ( "DATABASE_CA_CERT" ) do
56
+ [
57
+ verify: :verify_peer ,
58
+ cacertfile: System . get_env ( "DATABASE_CA_CERT" ) ,
59
+ verify_fun: & :ssl_verify_hostname . verify_fun / 3 ,
60
+ server_name_indication: String . to_charlist ( System . get_env ( "DATABASE_HOST" , "" ) )
61
+ ]
62
+ else
63
+ [ ]
64
+ end
65
+
54
66
config :turbo , Turbo.Repo ,
55
67
ssl: use_db_ssl ,
68
+ ssl_opts: db_ssl_opts ,
56
69
url: database_url ,
57
70
pool_size: String . to_integer ( System . get_env ( "POOL_SIZE" ) || "10" ) ,
58
71
socket_options: maybe_ipv6
Original file line number Diff line number Diff line change @@ -33,7 +33,6 @@ services:
33
33
- " 4000:4000"
34
34
volumes :
35
35
- ./docker_turbo_artifacts:/var/turbo_artifacts
36
-
37
36
turbo_racer_db :
38
37
image : postgres:14.2
39
38
container_name : turbo_racer_db
You can’t perform that action at this time.
0 commit comments