Skip to content

Commit e019491

Browse files
author
wtde
committed
Merge pull request 'v1.1'
2 parents 6e98886 + 87e84be commit e019491

140 files changed

Lines changed: 4110 additions & 8818 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.env

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
RAILS_ENV=development
22
PORT=3080
3-
POSTGRES_HOST="db"
3+
POSTGRES_HOST="twilight_db"
44
POSTGRES_PORT=5432
55
POSTGRES_DB=twilight_development
66
POSTGRES_USER=postgres
7-
POSTGRES_PASSWORD=pass
7+
POSTGRES_PASSWORD=pass
8+
REDIS_URL="redis://redis:6379/1"
9+
10+
HOST_URL="twilight.example.com" # Enter your URL, without http(s). Required for Docker.

.github/workflows/rspec.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
- name: Set up Ruby
1515
uses: ruby/setup-ruby@v1
1616
with:
17-
ruby-version: 2.7.7
17+
ruby-version: 3.3.2
1818
- name: Install libvips
1919
run: sudo apt-get install -y libvips
2020
- name: Install gems

.github/workflows/rubocop-analysis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
- name: Set up Ruby
2222
uses: ruby/setup-ruby@v1
2323
with:
24-
ruby-version: 2.7.7
24+
ruby-version: 3.3.2
2525

2626
- name: Rubocop run
2727
run: |

.gitignore

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
.vscode
88
.idea
99
.db-data
10+
.devbox
1011
.cache
1112
/config/credentials.yml
1213
/db/schema.rb
@@ -48,4 +49,10 @@ yarn-debug.log*
4849
.yarn-integrity
4950
config/database.yml
5051
Gemfile.lock
51-
.env
52+
.env
53+
gemset.nix
54+
flake.lock
55+
flake.nix
56+
devbox.d
57+
devbox.lock
58+
dump.rdb

.rubocop.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ require:
44

55
AllCops:
66
NewCops: enable
7-
TargetRubyVersion: 2.7.7
7+
TargetRubyVersion: 3.3.2
88
Exclude:
99
- 'bin/*'
1010
- 'config/**/*'

.ruby-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
ruby-2.7.7
1+
ruby-3.3.2

Dockerfile

Lines changed: 24 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Start from a small, trusted base image with the version pinned down
2-
FROM ruby:2.7.7-slim AS base
2+
FROM ruby:3.3.2-slim AS base
33

44
# Required Libraries
55
#RUN apt-get update; apt-get install -y --no-install-recommends \
@@ -15,55 +15,63 @@ RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
1515
RUN echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
1616

1717
RUN apt-get update; apt-get install -y --no-install-recommends \
18-
libpng-dev libjpeg-dev libtiff-dev \
18+
libpng-dev libjpeg-dev libtiff-dev ffmpeg \
1919
tzdata libv8-dev imagemagick libmagickwand-dev \
2020
libpq-dev libffi-dev \
21-
postgresql-client sqlite3 \
22-
#postgresql postgresql-contrib sqlite3 \
21+
postgresql-client \
2322
nodejs redis yarn
2423

2524
# This stage will be responsible for installing gems and npm packages
2625
FROM base AS dependencies
2726

28-
COPY Gemfile Gemfile.lock ./
27+
COPY Gemfile ./
28+
29+
# For EasyCaptcha install
30+
#RUN git clone https://github.com/4point/easy_captcha /vendor/gems/easy_captcha
31+
COPY ./vendor/gems/easy_captcha /vendor/gems/easy_captcha
2932

3033
# Install gems (excluding test dependencies)
31-
RUN bundle config set without "test" && \
32-
bundle install --jobs=3 --retry=3
34+
RUN gem install bundler -v 2.5.9
35+
36+
RUN bundle install --jobs=3 --retry=3
3337

3438
COPY package.json yarn.lock ./
3539

3640
# NodeJS & yarn install
37-
RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh | bash
38-
RUN . ~/.nvm/nvm.sh && nvm install node && \
39-
yarn install --frozen-lockfile
41+
RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash
42+
RUN . ~/.nvm/nvm.sh && nvm install 20.12.2 && nvm alias default 20.12.2 && \
43+
yarn install
4044

4145
# We're back at the base stage
4246
FROM base
4347

4448
# Create a non-root user to run the app and own app-specific files
45-
RUN adduser app
4649

4750
# Switch to this user
48-
USER app
4951

5052
# We'll install the app in this directory
51-
WORKDIR /home/app
5253

5354
# Copy over gems from the dependencies stage
5455
COPY --from=dependencies /usr/local/bundle/ /usr/local/bundle/
5556

5657
# Copy over npm packages from the dependencies stage
5758
# Note that we have to use `--chown` here
58-
COPY --chown=app --from=dependencies /node_modules/ node_modules/
59+
60+
COPY --from=dependencies /node_modules/ /root/app/node_modules/
5961

6062
# Finally, copy over the code
6163
# This is where the .dockerignore file comes into play
6264
# Note that we have to use `--chown` here
63-
COPY --chown=app . ./
65+
#RUN mkdir -p /root/app
66+
COPY . /root/app/
67+
68+
# For EasyCaptcha install
69+
COPY --from=dependencies /vendor/gems/ /root/app/vendor/gems/
70+
71+
WORKDIR /root/app
6472

6573
# Install assets
66-
# RUN cd /home/app && bundle exec rake webpacker:compile && bundle exec rake assets:precompile
74+
RUN cd /root/app && bundle exec rake webpacker:compile && bundle exec rake assets:precompile
6775

6876
# Listen port
6977
EXPOSE ${PORT}

Gemfile

Lines changed: 28 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -3,23 +3,23 @@
33
source 'https://rubygems.org'
44
git_source(:github) { |repo| "https://github.com/#{repo}.git" }
55

6-
ruby '2.7.7'
6+
ruby '3.3.2'
77

88
gem 'activerecord', '>= 6.1.7.1'
99
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
10-
gem 'rails', '~> 7.0.4.2'
10+
gem 'rails', '~> 7.0.8.1'
1111
# Use sqlite3 as the database for Active Record
12-
gem 'sqlite3', '>= 1.4'
12+
#gem 'sqlite3', '>= 1.4'
1313
# Use Puma as the app server
14-
gem 'puma', '>= 5.6.4'
14+
gem 'puma', '>= 6.4.2'
1515
# Use SCSS for stylesheets
1616
gem 'sass-rails', '>= 6'
1717
# Transpile app-like JavaScript. Read more: https://github.com/rails/webpacke
1818
gem 'webpacker', '>= 5.4.2'
1919
# Use JavaScript with ESM import maps [https://github.com/rails/importmap-rails]
2020
gem 'importmap-rails'
2121
# Hotwire's SPA-like page accelerator [https://turbo.hotwired.dev]
22-
gem 'turbo-rails'
22+
gem 'turbo-rails', '~> 2.0.5'
2323
# Turbolinks makes navigating your web application faster. Read more: https://github.com/turbolinks/turbolinks
2424
gem 'turbolinks', '>= 5'
2525
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
@@ -35,6 +35,17 @@ gem 'actionpack', '>= 6.1.4.1'
3535
# Reduces boot times through caching; required in config/boot.b
3636
gem 'bootsnap', '>= 1.4.4', require: false
3737

38+
group :development do
39+
# Access an interactive console on exception pages or by calling 'console' anywhere in the code
40+
gem 'web-console', '>= 4.1.0'
41+
# Display performance information such as SQL time and flame graphs for each request in your browser.
42+
# Can be configured to work on production as well see: https://github.com/MiniProfiler/rack-mini-profiler/blob/master/README.md
43+
gem 'listen'
44+
gem 'rack-mini-profiler'
45+
# Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
46+
gem 'spring'
47+
end
48+
3849
group :development, :test do
3950
# Call 'byebug' anywhere in the code to stop execution and get a debugger console
4051
gem 'byebug', platforms: %i[mri mingw x64_mingw]
@@ -43,17 +54,7 @@ group :development, :test do
4354
gem 'rspec'
4455
gem 'rspec-rails'
4556
gem 'rubocop-rspec', require: false
46-
end
47-
48-
group :development do
49-
# Access an interactive console on exception pages or by calling 'console' anywhere in the code
50-
gem 'web-console', '>= 4.1.0'
51-
# Display performance information such as SQL time and flame graphs for each request in your browser.
52-
# Can be configured to work on production as well see: https://github.com/MiniProfiler/rack-mini-profiler/blob/master/README.md
53-
gem 'listen', '~> 3.3'
54-
gem 'rack-mini-profiler', '~> 2.0'
55-
# Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
56-
gem 'spring'
57+
gem 'rubocop-performance'
5758
end
5859

5960
group :test do
@@ -79,34 +80,43 @@ gem 'rubocop-rails'
7980
gem 'action_policy'
8081
gem 'active_storage_validations'
8182
gem 'addressable', '>= 2.8.0'
83+
gem "ahoy_matey"
8284
gem 'betterlorem'
85+
gem 'closure_tree', '>= 7.4.0'
8386
gem 'devise'
8487
gem 'dry-initializer-rails'
85-
gem 'easy_captcha', github: 'kopylovvlad/easy_captcha'
88+
gem 'easy_captcha', path: 'vendor/gems/easy_captcha'
8689
gem 'enumerize'
90+
gem 'friendly_id', '~> 5.5.1'
8791
gem 'grape'
8892
gem 'image_processing', '>= 1.12.2'
8993
gem 'mini_magick'
9094
gem 'nokogiri', '>= 1.11.0.rc4'
9195
gem 'open-uri'
96+
gem 'paper_trail', '>= 15.1.0'
9297
gem 'pg'
98+
gem 'rake', '>= 13.2.1'
9399
gem 'redcarpet'
94100
gem 'reverse_markdown'
95-
gem 'rmagick', '~> 4.1.1'
101+
gem 'rmagick'
96102
gem 'rollbar'
97103
gem 'rubyzip'
104+
gem 'ruby-vips'
98105
gem 'simple_command'
99106
gem 'socksify', require: false # TCP through a SOCKS5 proxy
100107
gem 'telegram-bot'
101108

102109
gem 'sidekiq'
110+
gem 'base64'
111+
gem 'mutex_m'
103112

104113
gem 'bootstrap-sass'
105114
gem 'bootstrap-will_paginate', '~> 0.0.10'
106115
gem 'font-awesome-rails'
107116
gem 'font-awesome-sass', '~> 5.15.1'
108117
gem 'jquery-rails'
109118
gem 'jquery-ui-rails'
119+
gem 'meta-tags'
110120
gem 'rails_sortable'
111121
gem 'therubyracer', platforms: :ruby
112122
gem 'will_paginate', '~> 3.3.1'

0 commit comments

Comments
 (0)