Consolidated dockerfile commands
This commit is contained in:
parent
029981b7ee
commit
f2b51dca7b
2 changed files with 18 additions and 20 deletions
6
.github/workflows/lint_and_test.yml
vendored
6
.github/workflows/lint_and_test.yml
vendored
|
|
@ -43,13 +43,11 @@ jobs:
|
||||||
# See https://github.com/actions/runner/issues/241 and https://github.com/docker/compose/issues/8537
|
# See https://github.com/actions/runner/issues/241 and https://github.com/docker/compose/issues/8537
|
||||||
- name: Install Elixir and JS deps
|
- name: Install Elixir and JS deps
|
||||||
run: |
|
run: |
|
||||||
docker compose exec -T phx yarn install && cd assets && yarn install && cd ..
|
docker compose exec -T phx phx mix deps.get && yarn install && cd assets && yarn install && cd ..
|
||||||
docker compose exec -T phx mix deps.get
|
|
||||||
|
|
||||||
- name: Create and Migrate database
|
- name: Create and Migrate database
|
||||||
run: |
|
run: |
|
||||||
docker compose exec -T phx mix ecto.create
|
docker compose exec -T phx mix ecto.create && mix ecto.migrate
|
||||||
docker compose exec -T phx mix ecto.migrate
|
|
||||||
|
|
||||||
- name: Run code checks
|
- name: Run code checks
|
||||||
run: docker compose exec -T phx mix check --no-fix --no-retry
|
run: docker compose exec -T phx mix check --no-fix --no-retry
|
||||||
|
|
|
||||||
|
|
@ -9,10 +9,10 @@ ARG TARGETPLATFORM
|
||||||
RUN echo "Building for ${TARGETPLATFORM:?}"
|
RUN echo "Building for ${TARGETPLATFORM:?}"
|
||||||
|
|
||||||
# Install debian packages
|
# Install debian packages
|
||||||
RUN apt-get update -qq
|
RUN apt-get update -qq && \
|
||||||
RUN apt-get install -y inotify-tools curl git openssh-client jq \
|
apt-get install -y inotify-tools curl git openssh-client jq \
|
||||||
python3 python3-setuptools python3-wheel python3-dev pipx \
|
python3 python3-setuptools python3-wheel python3-dev pipx \
|
||||||
python3-mutagen locales procps build-essential graphviz
|
python3-mutagen locales procps build-essential graphviz
|
||||||
|
|
||||||
# Install ffmpeg
|
# Install ffmpeg
|
||||||
RUN export FFMPEG_DOWNLOAD=$(case ${TARGETPLATFORM:-linux/amd64} in \
|
RUN export FFMPEG_DOWNLOAD=$(case ${TARGETPLATFORM:-linux/amd64} in \
|
||||||
|
|
@ -23,25 +23,25 @@ RUN export FFMPEG_DOWNLOAD=$(case ${TARGETPLATFORM:-linux/amd64} in \
|
||||||
tar -xf /tmp/ffmpeg.tar.xz --strip-components=2 --no-anchored -C /usr/bin/ "ffmpeg" && \
|
tar -xf /tmp/ffmpeg.tar.xz --strip-components=2 --no-anchored -C /usr/bin/ "ffmpeg" && \
|
||||||
tar -xf /tmp/ffmpeg.tar.xz --strip-components=2 --no-anchored -C /usr/bin/ "ffprobe"
|
tar -xf /tmp/ffmpeg.tar.xz --strip-components=2 --no-anchored -C /usr/bin/ "ffprobe"
|
||||||
|
|
||||||
# Install nodejs
|
# Install nodejs and Yarn
|
||||||
RUN curl -sL https://deb.nodesource.com/setup_20.x -o nodesource_setup.sh
|
RUN curl -sL https://deb.nodesource.com/setup_20.x -o nodesource_setup.sh && \
|
||||||
RUN bash nodesource_setup.sh
|
bash nodesource_setup.sh && \
|
||||||
RUN apt-get install nodejs
|
apt-get install -y nodejs && \
|
||||||
RUN npm install -g yarn
|
npm install -g yarn
|
||||||
|
|
||||||
# Install baseline Elixir packages
|
# Install baseline Elixir packages
|
||||||
RUN mix local.hex --force
|
RUN mix local.hex --force && \
|
||||||
RUN mix local.rebar --force
|
mix local.rebar --force
|
||||||
|
|
||||||
# Download and update YT-DLP
|
# Download and update YT-DLP
|
||||||
RUN curl -L https://github.com/yt-dlp/yt-dlp/releases/latest/download/yt-dlp -o /usr/local/bin/yt-dlp
|
RUN curl -L https://github.com/yt-dlp/yt-dlp/releases/latest/download/yt-dlp -o /usr/local/bin/yt-dlp && \
|
||||||
RUN chmod a+rx /usr/local/bin/yt-dlp
|
chmod a+rx /usr/local/bin/yt-dlp && \
|
||||||
RUN yt-dlp -U
|
yt-dlp -U
|
||||||
|
|
||||||
# Install Apprise
|
# Install Apprise
|
||||||
RUN export PIPX_HOME=/opt/pipx && \
|
RUN export PIPX_HOME=/opt/pipx && \
|
||||||
export PIPX_BIN_DIR=/usr/local/bin && \
|
export PIPX_BIN_DIR=/usr/local/bin && \
|
||||||
pipx install apprise
|
pipx install apprise
|
||||||
|
|
||||||
# Set the locale
|
# Set the locale
|
||||||
RUN sed -i '/en_US.UTF-8/s/^# //g' /etc/locale.gen && locale-gen
|
RUN sed -i '/en_US.UTF-8/s/^# //g' /etc/locale.gen && locale-gen
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue