Skip to content

Commit 205123c

Browse files
committed
Revert "chore: upgrade node and ruby (#261)"
This reverts commit acdb9f9.
1 parent acdb9f9 commit 205123c

File tree

18 files changed

+4065
-3354
lines changed

18 files changed

+4065
-3354
lines changed

.dockerignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
node_modules
2+
/tmp/
3+
.vscode
4+
/public/assets/
5+
/public/packs/

.github/workflows/dev.yml

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,30 @@ on:
66
workflow_dispatch:
77

88
jobs:
9+
docker_publish:
10+
needs: deploy
11+
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- uses: actions/checkout@v2
16+
- name: Publish to Registry
17+
uses: elgohr/Publish-Docker-Github-Action@master
18+
with:
19+
name: standardnotes/listed
20+
username: ${{ secrets.DOCKER_USERNAME }}
21+
password: ${{ secrets.DOCKER_PASSWORD }}
22+
tags: "latest,${{ github.sha }}"
23+
924
deploy:
1025
runs-on: ubuntu-latest
26+
1127
steps:
1228
- uses: actions/checkout@v2
1329
- name: Set up Ruby
1430
uses: ruby/setup-ruby@v1
31+
with:
32+
ruby-version: 2.6
1533
- uses: actions/cache@v2
1634
with:
1735
path: vendor/bundle
@@ -44,9 +62,20 @@ jobs:
4462
LISTED_SSH_SERVER: ${{ secrets.LISTED_SSH_SERVER_DEV }}
4563
LISTED_SSH_DEPLOY_TO: ${{ secrets.LISTED_SSH_DEPLOY_TO_DEV }}
4664

65+
notify_discord:
66+
needs: deploy
67+
68+
runs-on: ubuntu-latest
69+
70+
steps:
71+
- name: Run Discord Webhook
72+
uses: johnnyhuy/actions-discord-git-webhook@main
73+
with:
74+
webhook_url: ${{ secrets.DISCORD_WEBHOOK_URL }}
75+
4776
code_scanning:
4877
runs-on: ubuntu-latest
49-
continue-on-error: true
78+
5079
steps:
5180
- uses: actions/checkout@v2
5281
- name: Runs Brakeman vulnerability scanner

.github/workflows/pr.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,13 @@ name: PR
22

33
on:
44
pull_request:
5-
branches: [ master ]
5+
branches: [ develop ]
66

77
jobs:
88
test:
9+
910
runs-on: ubuntu-latest
11+
1012
steps:
1113
- uses: actions/checkout@v2
1214
- name: Runs Brakeman vulnerability scanner

.github/workflows/prod.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,28 @@ on:
66
workflow_dispatch:
77

88
jobs:
9+
docker_publish:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- uses: actions/checkout@v2
14+
- name: Publish to Registry
15+
uses: elgohr/Publish-Docker-Github-Action@master
16+
with:
17+
name: standardnotes/listed
18+
username: ${{ secrets.DOCKER_USERNAME }}
19+
password: ${{ secrets.DOCKER_PASSWORD }}
20+
tags: "stable,${{ github.sha }}"
21+
922
deploy:
1023
runs-on: ubuntu-latest
24+
1125
steps:
1226
- uses: actions/checkout@v2
1327
- name: Set up Ruby
1428
uses: ruby/setup-ruby@v1
29+
with:
30+
ruby-version: 2.6
1531
- uses: actions/cache@v2
1632
with:
1733
path: vendor/bundle
@@ -43,3 +59,14 @@ jobs:
4359
LISTED_SSH_USER: ${{ secrets.LISTED_SSH_USER_PROD }}
4460
LISTED_SSH_SERVER: ${{ secrets.LISTED_SSH_SERVER_PROD }}
4561
LISTED_SSH_DEPLOY_TO: ${{ secrets.LISTED_SSH_DEPLOY_TO_PROD }}
62+
63+
notify_discord:
64+
needs: deploy
65+
66+
runs-on: ubuntu-latest
67+
68+
steps:
69+
- name: Run Discord Webhook
70+
uses: johnnyhuy/actions-discord-git-webhook@main
71+
with:
72+
webhook_url: ${{ secrets.DISCORD_WEBHOOK_URL }}

.nvmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
16.15.1
1+
14.18.2

.ruby-version

Lines changed: 0 additions & 1 deletion
This file was deleted.

Dockerfile

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
FROM ruby:2.6.5-slim-stretch
2+
3+
ARG UID=1000
4+
ARG GID=1000
5+
6+
RUN addgroup --system listed --gid $GID && adduser --disabled-password --system listed --gid $GID --uid $UID
7+
8+
RUN rm /bin/sh && ln -s /bin/bash /bin/sh
9+
10+
RUN apt-get update \
11+
&& apt-get install -y git build-essential libmariadb-dev curl imagemagick python \
12+
&& apt-get -y autoclean
13+
14+
RUN mkdir -p /usr/local/nvm
15+
ENV NVM_DIR /usr/local/nvm
16+
ENV NODE_VERSION 10.20.1
17+
ENV NVM_INSTALL_PATH $NVM_DIR/versions/node/v$NODE_VERSION
18+
ENV WEBPACKER_NODE_MODULES_BIN_PATH=value
19+
20+
RUN curl --silent -o- https://raw.githubusercontent.com/creationix/nvm/master/install.sh | bash
21+
22+
RUN source $NVM_DIR/nvm.sh \
23+
&& nvm install $NODE_VERSION \
24+
&& nvm alias default $NODE_VERSION \
25+
&& nvm use default
26+
27+
ENV NODE_PATH $NVM_INSTALL_PATH/lib/node_modules
28+
ENV PATH $NVM_INSTALL_PATH/bin:$PATH
29+
30+
RUN npm install -g yarn
31+
32+
WORKDIR /listed
33+
34+
RUN chown -R $UID:$GID .
35+
36+
USER listed
37+
38+
COPY --chown=$UID:$GID package.json yarn.lock Gemfile Gemfile.lock /listed/
39+
40+
RUN yarn install --pure-lockfile
41+
42+
RUN gem install bundler && bundle install
43+
44+
COPY --chown=$UID:$GID . /listed
45+
46+
RUN bundle exec rake assets:precompile
47+
48+
EXPOSE 3000
49+
50+
ENTRYPOINT [ "docker/entrypoint.sh" ]
51+
52+
CMD [ "start" ]

Gemfile

Lines changed: 45 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -5,53 +5,67 @@ git_source(:github) do |repo_name|
55
"https://github.com/#{repo_name}.git"
66
end
77

8+
gem 'rails', '= 5.2.5'
9+
gem 'mysql2'
10+
gem 'puma', '~> 4.3'
11+
gem 'sass-rails', '~> 5.0'
12+
gem 'uglifier', '>= 1.3.0'
13+
gem 'safe_yaml'
814
gem 'dotenv-rails', '~> 2.7.6'
15+
gem 'sanitize'
16+
gem 'rouge'
917
gem 'haml-rails'
10-
gem 'mini_racer', platforms: :ruby
11-
gem 'mysql2', '>= 0.3.13', '< 0.5'
12-
gem 'puma', '~> 4.3'
18+
gem 'whenever'
19+
gem 'redcarpet'
1320
gem 'rack-cors', :require => 'rack/cors'
14-
gem 'rails', '= 5.2.5'
1521
gem 'react_on_rails', '11.3'
16-
gem 'redcarpet'
17-
gem 'rouge'
18-
gem 'safe_yaml'
19-
gem 'sanitize'
20-
gem 'sass-rails', '~> 5.0'
21-
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]
22-
gem 'uglifier', '>= 1.3.0'
2322
gem 'webpacker', '~> 4'
24-
gem 'whenever'
25-
gem "aws-sdk-acm", "~> 1.34"
26-
gem "aws-sdk-elasticloadbalancingv2", "~> 1.47"
27-
gem "aws-sdk-route53", "~> 1.40"
28-
gem "aws-sdk-sns", "~> 1.49"
29-
gem "aws-sdk-sqs", "~> 1.48"
30-
gem "capistrano-shoryuken", "~> 0.1.5"
31-
gem "lograge", "~> 0.11.2"
32-
gem "newrelic_rpm", "= 8.2.0"
33-
gem "newrelic-infinite_tracing", "= 8.2.0"
34-
gem "rails-letsencrypt", "~> 0.9.0"
35-
gem "shoryuken", "~> 5.3"
3623

3724
group :development, :test do
3825
# Call 'byebug' anywhere in the code to stop execution and get a debugger console
3926
gem 'byebug', platform: :mri
4027
end
4128

4229
group :development do
43-
gem 'brakeman'
30+
# Access an IRB console on exception pages or by using <%= console %> anywhere in the code.
31+
gem 'web-console', '>= 3.3.0'
32+
gem 'listen', '~> 3.0.5'
33+
gem 'spring'
34+
gem 'spring-watcher-listen', '~> 2.0.0'
35+
gem 'rb-readline'
36+
# Deployment tools
37+
gem 'capistrano'
4438
gem 'capistrano-bundler'
45-
gem 'capistrano-git-submodule-strategy', '~> 0.1.22'
4639
gem 'capistrano-passenger', '>= 0.2.0'
4740
gem 'capistrano-rails'
4841
gem 'capistrano-rvm'
4942
gem 'capistrano-sidekiq'
50-
gem 'capistrano'
51-
gem 'listen', '~> 3.0.5'
52-
gem 'rb-readline'
53-
gem 'spring-watcher-listen', '~> 2.0.0'
54-
gem 'spring'
55-
gem 'web-console', '>= 3.3.0'
43+
gem 'capistrano-git-submodule-strategy', '~> 0.1.22'
5644
end
5745

46+
# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
47+
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]
48+
gem 'mini_racer', platforms: :ruby
49+
50+
51+
gem "rails-letsencrypt", "~> 0.9.0"
52+
53+
gem "aws-sdk-acm", "~> 1.34"
54+
55+
gem "aws-sdk-elasticloadbalancingv2", "~> 1.47"
56+
57+
gem "lograge", "~> 0.11.2"
58+
59+
gem "aws-sdk-route53", "~> 1.40"
60+
61+
gem "newrelic_rpm", "= 8.2.0"
62+
63+
gem "newrelic-infinite_tracing", "= 8.2.0"
64+
65+
gem "shoryuken", "~> 5.3"
66+
67+
gem "capistrano-shoryuken", "~> 0.1.5"
68+
69+
gem "aws-sdk-sqs", "~> 1.48"
70+
71+
gem "aws-sdk-sns", "~> 1.49"

0 commit comments

Comments
 (0)