-
-
Save DavidVII/fca8d36120b92387935871ac97e85df9 to your computer and use it in GitHub Desktop.
Installing Elixir/Erlang on Codex
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
############################################################################### | |
# codex_beam_bootstrap.sh ─ OTP 27 + Elixir 1.18 behind Codex MITM proxy | |
############################################################################### | |
go install github.com/asdf-vm/asdf/cmd/[email protected] | |
asdf plugin add erlang https://github.com/michallepicki/asdf-erlang-prebuilt-ubuntu-24.04.git || true | |
asdf plugin add elixir | |
asdf install erlang 27.3.4 | |
asdf set -u erlang 27.3.4 | |
asdf install elixir 1.18.3 | |
asdf set -u elixir 1.18.3 | |
echo 'PATH=$HOME/.asdf/shims:$PATH' >> ~/.bashrc | |
PATH=$HOME/.asdf/shims:$PATH | |
mix archive.install --force github hexpm/hex branch latest | |
install -Dm644 "$CODEX_PROXY_CERT" /usr/local/share/ca-certificates/codex-proxy.crt | |
update-ca-certificates | |
rm -rf deps _build mix.lock ~/.hex/cache | |
echo 'export ERL_SSL_CACERTFILE=/etc/ssl/certs/ca-certificates.crt' >> ~/.bashrc | |
echo 'export HEX_CACERTS_PATH=/etc/ssl/certs/ca-certificates.crt' >> ~/.bashrc | |
echo 'export HEX_CDN="https://cdn.jsdelivr.net/hex"' >> ~/.bashrc | |
echo 'export HEX_MIRROR="https://cdn.jsdelivr.net/hex"' >> ~/.bashrc | |
echo 'export HEX_HTTP_CONCURRENCY=1' >> ~/.bashrc | |
export ERL_SSL_CACERTFILE=/etc/ssl/certs/ca-certificates.crt | |
export HEX_CACERTS_PATH=/etc/ssl/certs/ca-certificates.crt | |
export HEX_MIRROR="https://cdn.jsdelivr.net/hex" | |
export HEX_CDN="https://cdn.jsdelivr.net/hex" | |
export HEX_HTTP_CONCURRENCY=1 | |
mix deps.get |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment