Skip to content

Elixir

Elixir is a functional, concurrent, high-level general-purpose programming language that runs on the BEAM virtual machine, which is also used to implement the Erlang programming language.

Report an issue
updated
variables
6
images
5
author
mravox@proton.me
sha256
a24d8bcea9b8

Readme

Elixir Language Generic

This egg is designed to run any generic Elixir application, allowing users to pull their own Elixir source code from a Git repository.

There is an option to allow a user to upload their own files to run a server.

The startup configs and commands may need changing to actually function properly.

Configuration

The server will be stuck as starting until the egg Start Configuration is modified. You have to edit the text to match something your bot will print for Pterodactyl panel to detect it as running. image

You can use arrays to have multiple different values when different bots are being used

{
  "done":[
    "change this text 1",
    "change this text 2"
  ]
}

Startup command

if [[ -d .git ]] && [[ {{AUTO_UPDATE}} == "1" ]]; then git pull; fi; mix deps.get; mix run --no-halt

The parts in blue are filled in by the panel when the server starts, from the variables below.

Docker images

  • Elixir Latest ghcr.io/ptero-eggs/yolks:elixir_latest
  • Elixir 1.15 ghcr.io/ptero-eggs/yolks:elixir_1.15
  • Elixir 1.14 ghcr.io/ptero-eggs/yolks:elixir_1.14
  • Elixir 1.13 ghcr.io/ptero-eggs/yolks:elixir_1.13
  • Elixir 1.12 ghcr.io/ptero-eggs/yolks:elixir_1.12

4 contributors

Variables

6 settings

  • Git Repository Address

    The Git repository address to clone .

    env
    GIT_ADDRESS
    default
    none
    rules
    nullable|string
    • viewable
    • editable
  • Git Branch

    The Git branch to install.

    env
    GIT_BRANCH
    default
    none
    rules
    nullable|string
    • viewable
    • editable
  • User Uploaded Files

    Skip all the install stuff if you are letting a user upload files. 0 = false (default) 1 = true

    env
    USER_UPLOAD
    default
    0
    rules
    required|boolean
    • viewable
    • editable
  • Auto Update

    Pull the latest files on startup when using a Git Repository. 0 = false (default) 1 = true

    env
    AUTO_UPDATE
    default
    0
    rules
    required|boolean
    • viewable
    • editable
  • Git Username

    Git username for authentication.

    env
    GIT_USERNAME
    default
    none
    rules
    nullable|string
    • viewable
    • editable
  • Git Access Token

    Git access token for authentication.

    env
    GIT_ACCESS_TOKEN
    default
    none
    rules
    nullable|string
    • viewable
    • editable
Installation script 58 lines container ghcr.io/ptero-eggs/installers:debian entrypoint bash show
#!/bin/bash
# Elixir App Installation Script
#
# Server Files: /mnt/server
mkdir -p /mnt/server
cd /mnt/server


if [ "${USER_UPLOAD}" == "true" ] || [ "${USER_UPLOAD}" == "1" ]; then
    echo -e "assuming user knows what they are doing have a good day."
    exit 0
fi

## add git ending if it's not on the address
if [[ ${GIT_ADDRESS} != *.git ]]; then
    GIT_ADDRESS=${GIT_ADDRESS}.git
fi

if [ -z "${GIT_USERNAME}" ] && [ -z "${GIT_ACCESS_TOKEN}" ]; then
    echo -e "using anon api call"
else
    GIT_ADDRESS="https://${GIT_USERNAME}:${GIT_ACCESS_TOKEN}@$(echo -e ${GIT_ADDRESS} | cut -d/ -f3-)"
fi

## pull git elixir repository
if [ "$(ls -A /mnt/server)" ]; then
    echo -e "/mnt/server directory is not empty."
    if [ -d .git ]; then
        echo -e ".git directory exists"
        if [ -f .git/config ]; then
            echo -e "loading info from git config"
            ORIGIN=$(git config --get remote.origin.url)
        else
            echo -e "files found with no git config"
            echo -e "closing out without touching things to not break anything"
            exit 10
        fi
    fi

    if [ "${ORIGIN}" == "${GIT_ADDRESS}" ]; then
        echo "pulling latest from github"
        git pull
    fi
else
    echo -e "/mnt/server is empty.\ncloning files into repo"
    if [ -z ${GIT_BRANCH} ]; then
        echo -e "cloning default branch"
        git clone ${GIT_ADDRESS} .
    else
        echo -e "cloning ${GIT_BRANCH}'"
        git clone --single-branch --branch ${GIT_BRANCH} ${GIT_ADDRESS} .
    fi
fi

## install end
echo "-----------------------------------------"
echo "Installation completed..."
echo "-----------------------------------------"