Hi, I feel like I’m on the final leg of a marathon …
The app is really simple. Does one thing. Talks to Airtable, gets some json and wraps that into a .pdf. No db, no html. Only one thing I have to get right - where to put the Airtable authorisation token.
Production compiled and released and working at localhost:443. Everything for push to gigalixir seems correct, but it fails, so I’ve got something horribly wrong.
Here’s config.exs - I doubt it could be any shorter
config :app, AppWeb.Endpoint,
load_from_system_env: true
config :logger, level: :info
import_config “releases.exs”
I’m not sure about import_config "releases.exs
. But I’ve renamed prod.secret.exs
and that’s where the Airtable auth token now lives…
config :app,
airtable_api_key: “key”
And endpoint.ex
now has the standard init function that seems to be well thumbed.
What piece of the jigsaw do I need to change? And could someone please write a clear tutorial for those like me who has just learned that “setting the port at build” means that I have to manually type and set it in the terminal
Enumerating objects: 118, done.
Counting objects: 100% (118/118), done.
Delta compression using up to 8 threads
Compressing objects: 100% (110/110), done.
Writing objects: 100% (118/118), 29.48 KiB | 443.00 KiB/s, done.
Total 118 (delta 49), reused 0 (delta 0), pack-reused 0
remote: Resolving deltas: 100% (49/49), done.
remote: Starting deploy
remote: Preparing cache
remote: Compiling code and generating slug.
remote: Setting environment variables.
remote: * LIBCLUSTER_KUBERNETES_SELECTOR
remote: * LIBCLUSTER_KUBERNETES_NODE_BASENAME
remote: * APP_NAME
remote: * SECRET_KEY_BASE
remote: * PORT
remote: * SOURCE_VERSION
remote: Cloning into ‘studious-harmonious-redpoll’…
remote: warning: You appear to have cloned an empty repository.
remote: done.
remote: latest: Pulling from gigalixir-152404/build-18
remote: Digest: sha256:5fc09e182acefc099d28d2ec2ab75b3787a62d6798f01f001edc1e6e38785a1d
remote: Status: Image is up to date for Google Cloud console
remote: Google Cloud console
remote: -----> Detecting assets directory
remote: no package.json found
remote: Elixir+Releases app detected
remote: Detecting assets directory
remote: no package.json found
remote: =====> Downloading Buildpack: GitHub - HashNuke/heroku-buildpack-elixir: Heroku Buildpack for Elixir with nitro boost
remote: =====> Detected Framework: Elixir
remote: -----> Will export the following config vars:
remote: APP_NAME
remote: LIBCLUSTER_KUBERNETES_NODE_BASENAME
remote: LIBCLUSTER_KUBERNETES_SELECTOR
remote: PORT
remote: SECRET_KEY_BASE
remote: SOURCE_VERSION
remote: * MIX_ENV=prod
remote: -----> Checking Erlang and Elixir versions
remote: WARNING: elixir_buildpack.config wasn’t found in the app
remote: Using default config from Elixir buildpack
remote: Will use the following versions:
remote: * Stack heroku-18
remote: * Erlang 20.1
remote: * Elixir 1.5.3
remote: -----> Using cached Erlang 20.1
remote: -----> Installing Erlang 20.1
remote:
remote: -----> Using cached Elixir v1.5.3
remote: -----> Installing Elixir v1.5.3
remote: -----> Installing Hex
remote: * creating /app/.mix/archives/hex-0.20.5
remote: -----> Installing rebar
remote: * creating /app/.mix/rebar
remote: * creating /app/.mix/rebar3
remote: -----> Fetching app dependencies with mix
remote: ** (Mix.Config.LoadError) could not load config config/config.exs
remote: ** (CompileError) config/config.exs:8: module Config is not loaded and could not be found
remote: (elixir) lib/code.ex:176: Code.eval_string/3
remote: (mix) lib/mix/config.ex:180: Mix.Config.read!/2
remote: Deploy aborted
To https://git.gigalixir.com/studious-harmonious-redpoll.git/
! [remote rejected] master → master (pre-receive hook declined)
error: failed to push some refs to ‘https://git.gigalixir.com/studious-harmonious-redpoll.git/’