Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build multiarch docker images in CI #47

Draft
wants to merge 6 commits into
base: master
Choose a base branch
from
Draft
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
10 changes: 5 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,10 @@ jobs:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

# - name: Set up QEMU
# uses: docker/setup-qemu-action@master
# with:
# platforms: all
- name: Set up QEMU
uses: docker/setup-qemu-action@master
with:
platforms: all

- name: Set up Docker Buildx
id: buildx
Expand Down Expand Up @@ -103,7 +103,7 @@ jobs:
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
platforms: linux/amd64 # ,linux/arm64,linux/arm/v7
platforms: linux/amd64,linux/arm64,linux/arm/v7
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new

Expand Down
1 change: 0 additions & 1 deletion .ruby-version

This file was deleted.

3 changes: 3 additions & 0 deletions .tool-versions
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
ruby 3.2.1
nodejs 12.22.12
yarn 1.22.10
6 changes: 2 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
FROM ruby:2.7.4-bullseye
FROM ruby:3.2.1-bullseye

RUN apt-get update -qq && apt-get install -y nodejs npm postgresql-client python3 python3-pip ffmpeg
RUN npm install -g yarn


RUN mkdir /app
WORKDIR /app

Expand Down Expand Up @@ -31,9 +30,8 @@ ENV RAILS_ENV=production
# Precompile assets
RUN webpack

RUN pip3 install youtube-dl

ENV RAILS_SERVE_STATIC_FILES="yes"
ENV RAILS_LOG_TO_STDOUT="yes"
ENV PORT=3000

CMD ["start-server"]
31 changes: 18 additions & 13 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
source 'https://rubygems.org'
git_source(:github) { |repo| "https://github.com/#{repo}.git" }

ruby '2.7.4'
ruby '3.2.1'

gem 'dotenv-rails', "~> 2.7", groups: [:development, :test], require: 'dotenv/rails-now'

Expand All @@ -18,6 +18,9 @@ gem 'jbuilder', '~> 2.10'
# Use Active Model has_secure_password
# gem 'bcrypt', '~> 3.1.7'

# prevents .../ruby/3.2.0/psych/visitors/to_ruby.rb:432:in `visit_Psych_Nodes_Alias': Alias parsing was not enabled. To enable it, pass `aliases: true` to `Psych::load` or `Psych::safe_load`. (Psych::AliasesNotEnabled)
gem 'psych', '< 4'

gem 'pg', "~> 1.2"
gem 'sequel-rails', "~> 1.1"

Expand All @@ -31,12 +34,14 @@ gem 'sidekiq-scheduler', "~> 3.0"
gem 'graphql', "~> 1.10"
gem 'graphiql-rails', "~> 1.7"

gem 'dry-rails', git: 'https://github.com/dry-rb/dry-rails.git', branch: :master
gem 'dry-monads', "~> 1.3"
gem 'dry-view', "~> 0.7"
gem 'dry-cli', "~> 0.6"
gem 'dry-events', "~> 0.2"
gem 'dry-effects', "~> 0.1"
gem 'dry-rails', "~> 0.3.0"
gem 'dry-monads', "~> 1.4.0"
gem 'dry-view', "~> 0.7.0"
gem 'dry-cli', "~> 0.7.0"
gem 'dry-events', "~> 0.3.0"
gem 'dry-effects', "~> 0.1.0"
gem 'dry-container', "~> 0.8.0"
gem 'dry-auto_inject', "~> 0.8.0"

gem 'devise', "~> 4.7"
gem 'sequel-devise', "~> 0.0"
Expand All @@ -45,7 +50,7 @@ gem 'devise-token_authenticatable', "~> 1.1"

gem 'shrine', '~> 3.2'

gem 'ytdl', "~> 0.1.0"
gem 'ytdl', "~> 0.2.0"

gem 'slim-rails', "~> 3.2"
gem 'builder', "~> 3.2"
Expand All @@ -65,16 +70,16 @@ end

group :development do
# Preview mail in the browser instead of sending
gem 'letter_opener', "~> 1.7"
gem 'letter_opener'

# Debug I18n keys
# gem 'i18n-debug'

# Access an interactive console on exception pages or by calling 'console' anywhere in the code.
gem 'web-console', '~> 4.0'
gem 'listen', '~> 3.1', '< 3.2'
gem 'better_errors', "~> 2.7"
gem 'binding_of_caller', "~> 0.8"
gem 'web-console'
gem 'listen'
gem 'better_errors'
gem 'binding_of_caller'
end

# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
Expand Down
Loading