Consolidated dockerfile commands

This commit is contained in:
Kieran Eglin 2024-07-17 10:53:19 -07:00
parent 029981b7ee
commit f2b51dca7b
No known key found for this signature in database
GPG key ID: 193984967FCF432D
2 changed files with 18 additions and 20 deletions

View file

@ -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

View file

@ -9,8 +9,8 @@ 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
@ -23,20 +23,20 @@ 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 && \