Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/bigbluebutton/greenlight
Browse files Browse the repository at this point in the history
…into SIP
  • Loading branch information
Your Name committed May 30, 2023
2 parents 8470182 + f402ad5 commit a91eb30
Show file tree
Hide file tree
Showing 44 changed files with 3,984 additions and 338 deletions.
29 changes: 17 additions & 12 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,26 +4,31 @@
README.md
SECURITY.md
.github
.gitlab-ci.yml
.rvmrc

# Rails
.env*
*.rbc
capybara-*.html
.rspec
log
tmp
**/.bundle/
*.dev
.rubocop.yml
log/*
tmp/*
storage/*
/db/**/*.sqlite3
/db/**/*.sqlite3-journal
/db/production
/db/production-postgres
public/assets
public/b
public/**/assets/
coverage/
.rvmrc
vendor/bundle
.bundle
Dockerfile
.gitlab-ci.yml
.rubocop.yml
spec
test
vendor/*
Dockerfile*
spec/
test/
**/node_modules/
app/assets/builds/*
dockerfiles/
!**/.keep
6 changes: 3 additions & 3 deletions .github/workflows/ci.build.release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,19 +49,19 @@ jobs:
id: ci_tag_release_version
if: contains(env.DOCKER_BUILD_ENABLED, 'true')
shell: bash
run: echo "##[set-output name=tag;]$(echo ${GITHUB_REF#refs/tags/} | cut -c 9-)"
run: echo "##[set-output name=tag;]$(echo ${{github.ref_name}} | cut -c 9-)"

- name: Extract Tag Release Major
id: ci_tag_release_major
if: contains(env.DOCKER_BUILD_ENABLED, 'true')
shell: bash
run: echo "##[set-output name=tag;]$(echo ${{steps.ci_tag_release_version.outputs.tag}} | cut -f1-1 -d'.')"
run: echo "##[set-output name=tag;]$(echo ${{steps.ci_tag_release_version.outputs.tag}} | cut -f 1-1 -d '.')"

- name: Extract Tag Release Minor
id: ci_tag_release_minor
if: contains(env.DOCKER_BUILD_ENABLED, 'true')
shell: bash
run: echo "##[set-output name=tag;]$(echo ${{steps.ci_tag_release_version.outputs.tag}} | cut -f1-2 -d'.')"
run: echo "##[set-output name=tag;]$(echo ${{steps.ci_tag_release_version.outputs.tag}} | cut -f 1-2 -d '.')"

- name: Build and Push
if: contains(env.DOCKER_BUILD_ENABLED, 'true')
Expand Down
72 changes: 31 additions & 41 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,56 +1,46 @@
FROM alpine:3.17 AS alpine
FROM ruby:alpine3.17 AS base

ARG RAILS_ROOT=/usr/src/app
ENV RAILS_ROOT=${RAILS_ROOT}

FROM alpine AS base
WORKDIR $RAILS_ROOT
RUN apk add --no-cache \
libpq \
libxml2 \
libxslt \
ruby \
ruby-irb \
ruby-bigdecimal \
ruby-bundler \
ruby-json \
tzdata \
bash \
shared-mime-info

FROM base
RUN apk add --no-cache \
build-base \
curl-dev \
git \
gettext \
imagemagick \
libxml2-dev \
libxslt-dev \
pkgconf \
postgresql-dev \
ruby-dev \
nodejs npm \
yarn \
yaml-dev \
zlib-dev \
&& ( echo 'install: --no-document' ; echo 'update: --no-document' ) >>/etc/gemrc
COPY . ./
RUN bundle install -j4 \
&& yarn install

ARG RAILS_ENV
ENV RAILS_ENV=${RAILS_ENV:-production}
ARG NODE_ENV
ENV NODE_ENV=${RAILS_ENV}
ARG RAILS_LOG_TO_STDOUT
ENV RAILS_LOG_TO_STDOUT=${RAILS_LOG_TO_STDOUT:-true}
ARG RAILS_SERVE_STATIC_FILES
ENV RAILS_SERVE_STATIC_FILES=${RAILS_SERVE_STATIC_FILES:-true}
ARG PORT
ENV PORT=${PORT:-3000}

EXPOSE ${PORT}

ARG VERSION_TAG
ENV VERSION_TAG=$VERSION_TAG
ENV PATH=$PATH:$RAILS_ROOT/bin
WORKDIR $RAILS_ROOT
RUN bundle config --local deployment 'true' \
&& bundle config --local without 'development:test'

FROM base as build

ARG PACKAGES='alpine-sdk libpq-dev'
COPY Gemfile Gemfile.lock ./
RUN apk update \
&& apk add --update --no-cache ${PACKAGES} \
&& bundle install --no-cache \
&& bundle doctor

FROM base as prod

ARG PACKAGES='libpq-dev tzdata imagemagick yarn bash'
COPY --from=build $RAILS_ROOT/vendor/bundle ./vendor/bundle
COPY package.json yarn.lock ./
RUN apk update \
&& apk add --update --no-cache ${PACKAGES} \
&& yarn install --production --frozen-lockfile \
&& yarn cache clean
COPY . ./
RUN apk update \
&& apk upgrade \
&& update-ca-certificates

EXPOSE ${PORT}
ENTRYPOINT [ "./bin/start" ]
4 changes: 2 additions & 2 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ gem 'active_model_serializers'
gem 'active_storage_validations'
gem 'aws-sdk-s3', require: false
gem 'bcrypt', '~> 3.1.7'
gem 'bigbluebutton-api-ruby', '1.8'
gem 'bigbluebutton-api-ruby', '1.9.1'
gem 'bootsnap', require: false
gem 'cssbundling-rails'
gem 'data_migrate'
Expand All @@ -28,7 +28,7 @@ gem 'omniauth-rails_csrf_protection', '~> 1.0.1'
gem 'pagy', '~> 5.10', '>= 5.10.1'
gem 'pg'
gem 'puma', '~> 5.0'
gem 'rails', '~> 7.0.4', '>= 7.0.4.2'
gem 'rails', '~> 7.0.4', '>= 7.0.4.3'
gem 'redis', '~> 4.0'
gem 'sprockets-rails'
gem 'tzinfo-data', platforms: %i[mingw mswin x64_mingw jruby]
Expand Down
Loading

0 comments on commit a91eb30

Please sign in to comment.