Skip to content

Commit

Permalink
chore: update to elixir 1.16, otp 25 and nostrum 0.9
Browse files Browse the repository at this point in the history
  • Loading branch information
portasynthinca3 committed Feb 26, 2024
1 parent 06baa4a commit 0d67476
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 31 deletions.
12 changes: 8 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# build
FROM bitwalker/alpine-elixir:1.14 as build
FROM elixir:1.16-otp-25-alpine as build

COPY config config
COPY lib lib
Expand All @@ -8,7 +8,9 @@ COPY mix.exs mix.exs
COPY mix.lock mix.lock
COPY .git .git

RUN apk add build-base libexecinfo-dev git
RUN apk add musl-dev build-base git
RUN apk add libexecinfo-dev --repository=https://dl-cdn.alpinelinux.org/alpine/v3.12/main
# ^^^^ BAD!!!
RUN export MIX_ENV=prod && \
rm -rf _build && \
mix deps.get && \
Expand All @@ -18,17 +20,19 @@ RUN mkdir /export && \
cp -r _build/prod/rel/deutexrium/ /export

# deploy
FROM bitwalker/alpine-elixir:1.14
FROM alpine:3

ENV REPLACE_OS_VARS=true
ENV RELEASE_NODE=deuterium
RUN mkdir -p /opt/app
COPY --from=build /export/ /opt/app

RUN apk add \
libstdc++ libgcc ncurses-libs libexecinfo \
libstdc++ libgcc ncurses-libs \
imagemagick \
font-noto ttf-linux-libertine
RUN apk add libexecinfo --repository=https://dl-cdn.alpinelinux.org/alpine/v3.12/main
# ^^^^ BAD!!!

RUN printf "-kernel inet_dist_listen_min 25565 inet_dist_listen_max 25565 +spp true" > vm.args
ENV RELEASE_VM_ARGS=vm.args
Expand Down
2 changes: 1 addition & 1 deletion config/runtime.exs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import Config

config :nostrum,
token: System.get_env("DEUTEX_TOKEN")
token: System.get_env("DEUTEX_TOKEN") |> String.trim
4 changes: 2 additions & 2 deletions mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ defmodule Deutexrium.MixProject do
def project do
[
app: :deutexrium,
version: "2.6.0",
version: "2.6.1",
elixir: "~> 1.8",
start_permanent: Mix.env() == :prod,
deps: deps(),
Expand Down Expand Up @@ -33,7 +33,7 @@ defmodule Deutexrium.MixProject do

defp deps do
[
{:nostrum, "~> 0.6.1"},
{:nostrum, github: "kraigie/nostrum", ref: "d2daf4941927bc4452a4e79acbef4a574ce32f57"},
{:logger_file_backend, "~> 0.0.13"},
{:cyanide, "~> 1.0"},
{:markov, "~> 4.1.3"},
Expand Down
Loading

0 comments on commit 0d67476

Please sign in to comment.