neiam
/lambent_ex
Lambent Aether 5
public · Issues · Pulls 1 · Labels · Forks · Compare · Actions success · Badges · Packages
⭐
Log in to mark this repository.
fix the dockerfile etc
8dd111c · gmorell · 2022-12-21 22:54
Files changed
modified
Dockerfile
+1
−1
@@ -23,7 +23,7 @@ RUN mix release ${app_name} \
| 23 | 23 | FROM alpine:latest |
| 24 | 24 | ARG project_id |
| 25 | 25 | RUN apk update \ |
| 26 | − && apk --no-cache --update add bash ca-certificates openssl-dev libgcc libstdc++ | |
| 26 | + && apk --no-cache --update add bash ca-certificates openssl-dev libgcc libstdc++ libcrypto1.1 | |
| 27 | 27 | EXPOSE ${PORT} |
| 28 | 28 | WORKDIR /opt/app |
| 29 | 29 | COPY --from=0 /opt/release . |
modified
config/runtime.exs
+9
−6
@@ -26,12 +26,15 @@ if config_env() == :prod do
| 26 | 26 | # want to use a different value for prod and you most likely don't want |
| 27 | 27 | # to check this value into version control, so we use an environment |
| 28 | 28 | # variable instead. |
| 29 | − secret_key_base = | |
| 30 | − System.get_env("SECRET_KEY_BASE") || | |
| 31 | − raise """ | |
| 32 | − environment variable SECRET_KEY_BASE is missing. | |
| 33 | − You can generate one by calling: mix phx.gen.secret | |
| 34 | − """ | |
| 29 | + | |
| 30 | + # We don't use the sessions at all at the moment so I'm going to generate one on boot by | |
| 31 | + # stolen from Mix.Tasks.Phx.Gen.Secret.run(["64"]) | |
| 32 | + secret_key_base = :crypto.strong_rand_bytes(64) |> Base.encode64(padding: false) |> binary_part(0, 64) | |
| 33 | +# System.get_env("SECRET_KEY_BASE") || | |
| 34 | +# raise """ | |
| 35 | +# environment variable SECRET_KEY_BASE is missing. | |
| 36 | +# You can generate one by calling: mix phx.gen.secret | |
| 37 | +# """ | |
| 35 | 38 | |
| 36 | 39 | host = System.get_env("PHX_HOST") || "example.com" |
| 37 | 40 | port = String.to_integer(System.get_env("PORT") || "4000") |
Parents: 6dcf439