Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 6 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -32,17 +32,16 @@ ARG DATABASE_URL
ARG BUILDER_IMAGE="hexpm/elixir:${ELIXIR_VERSION}-erlang-${OTP_VERSION}-debian-${DEBIAN_VERSION}"
ARG RUNNER_IMAGE="debian:${DEBIAN_VERSION}"

FROM --platform=linux/amd64 ${BUILDER_IMAGE} as builder
FROM ${BUILDER_IMAGE} as builder


# install build dependencies
RUN apt-get update -y && apt-get install -y build-essential git curl wget && apt-get clean && rm -f /var/lib/apt/lists/*_*
RUN apt-get update -y && apt-get install -y --no-install-recommends build-essential ca-certificates curl git gnupg libpq-dev wget && apt-get clean && rm -f /var/lib/apt/lists/*_*
RUN curl -fsSL https://deb.nodesource.com/setup_20.x | bash - && apt-get install -y nodejs
RUN npm install -g npm@9.8.1
RUN wget -O - 'https://github.com/elm/compiler/releases/download/0.19.1/binary-for-linux-64-bit.gz' | gunzip -c >/usr/local/bin/elm

# make the elm compiler executable
RUN chmod +x /usr/local/bin/elm
# Elm 0.19.1 via @lydell/elm: ships native binaries for linux_arm64, darwin_arm64,
# linux_x64 and darwin_x64 (vs. the official upstream binary which is amd64 only).
RUN npm install -g @lydell/elm@0.19.1-14 && ln -sf "$(npm root -g)/@lydell/elm/bin/elm" /usr/local/bin/elm

# prepare build dir
WORKDIR /app
Expand Down Expand Up @@ -100,7 +99,7 @@ RUN mix release

# start a new build stage so that the final image will only contain
# the compiled release and other runtime necessities
FROM --platform=linux/amd64 ${RUNNER_IMAGE}
FROM ${RUNNER_IMAGE}

RUN apt-get update -y && apt-get install -y libstdc++6 openssl libncurses5 locales && apt-get clean && rm -f /var/lib/apt/lists/*_*

Expand Down
1 change: 0 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ services:
POSTGRES_DB: azimutt_dev
backend:
container_name: azimutt-backend
platform: linux/amd64
restart: always
build:
context: .
Expand Down
10 changes: 9 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,5 +37,13 @@
"engines": {
"pnpm": "9.5.0"
},
"packageManager": "pnpm@9.5.0+sha256.dbdf5961c32909fb030595a9daa1dae720162e658609a8f92f2fa99835510ca5"
"packageManager": "pnpm@9.5.0+sha256.dbdf5961c32909fb030595a9daa1dae720162e658609a8f92f2fa99835510ca5",
"pnpm": {
"overrides": {
"elm": "npm:@lydell/elm@0.19.1-14"
},
"neverBuiltDependencies": [
"elm-coverage"
]
}
}
Loading