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

61 update documentation and docker build #66

Merged
merged 6 commits into from
Jun 28, 2022
Merged
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
4 changes: 2 additions & 2 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
.bundle/
.dockerignore
.git/
.github/
.gitignore
.vagrant/
db/*.sqlite3
docker-compose.yml
Gemfile.lock
node_modules/
screenshots/
vendor/
vendor/bundle
8 changes: 1 addition & 7 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
# Ignore bundler config.
/.bundle
/.vendor
/vendor/bundle

# Ignore the default SQLite database.
/db/*.sqlite3
Expand Down Expand Up @@ -37,17 +38,10 @@

/public/packs
/public/packs-test
/node_modules
/yarn-error.log
yarn-debug.log*
.yarn-integrity

# macOS
.DS_Store

# nodejs and yarn
package-lock.json

# HDM Settings
/config/hdm.yml

Expand Down
6 changes: 0 additions & 6 deletions .rubocop_todo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -668,12 +668,6 @@ Style/SingleArgumentDig:
Style/SpecialGlobalVars:
EnforcedStyle: use_perl_names

# Offense count: 2
# Cop supports --auto-correct.
Style/StderrPuts:
Exclude:
- 'bin/yarn'

# Offense count: 785
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, ConsistentQuotesInMultiline.
Expand Down
1 change: 0 additions & 1 deletion .tool-versions
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
ruby 2.5.3
nodejs 12.14.0
3 changes: 0 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,11 @@ rvm: 2.5.8

cache:
bundler: true
yarn: true

before_install:
- yes | gem update --system --force
- gem install bundler
- nvm install v14.16.0

install:
- bundle install
- yarn install
- cp config/hdm.yml.template config/hdm.yml
22 changes: 9 additions & 13 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,3 @@
FROM ruby:3.1.2-alpine as build

ENV APP_HOME /hdm
WORKDIR $APP_HOME

COPY . $APP_HOME
COPY config/hdm.yml.template $APP_HOME/config/hdm.yml

FROM ruby:3.1.2-alpine

RUN apk add --update --no-cache \
Expand All @@ -24,14 +16,18 @@ RUN apk add --update --no-cache \
sqlite-dev \
# not needed for gems, but for runtime
git \
# yarn \ # works without this but produces a short error, that yarn is not found
tzdata

RUN gem install bundler -v 2.3.11
# RUN gem install bundler -v 2.3.11

ENV APP_HOME /hdm
WORKDIR $APP_HOME

COPY . $APP_HOME
COPY config/hdm.yml.template $APP_HOME/config/hdm.yml

COPY --from=build /hdm /hdm
WORKDIR /hdm
RUN bundle check || (bundle config set --local without 'test' && bundle install)

RUN bundle check || bundle install --without test
EXPOSE 3000

CMD ["/hdm/bin/entry.sh"]
1 change: 1 addition & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -75,3 +75,4 @@ gem 'gitable', require: "gitable/uri"

# dependencies & sec fixes
# gem "nokogiri", ">= 1.13.2" # needs ruby >= 2.6.0
gem 'mini_racer' # minimal Google V8 JS engine for execjs
6 changes: 6 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,9 @@ GEM
rails-dom-testing (>= 1, < 3)
railties (>= 4.2.0)
thor (>= 0.14, < 2.0)
libv8-node (16.10.0.0)
libv8-node (16.10.0.0-x86_64-darwin)
libv8-node (16.10.0.0-x86_64-linux)
listen (3.7.1)
rb-fsevent (~> 0.10, >= 0.10.3)
rb-inotify (~> 0.9, >= 0.9.10)
Expand All @@ -162,6 +165,8 @@ GEM
mime-types-data (3.2022.0105)
mini_mime (1.1.2)
mini_portile2 (2.8.0)
mini_racer (0.6.2)
libv8-node (~> 16.10.0.0)
minitest (5.15.0)
multi_json (1.15.0)
multi_xml (0.6.0)
Expand Down Expand Up @@ -359,6 +364,7 @@ DEPENDENCIES
importmap-rails
jquery-rails
listen (~> 3.2)
mini_racer
puma (~> 5.6)
puppet
puppetdb-ruby
Expand Down
1 change: 0 additions & 1 deletion MANUAL_INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ As root do:
bundle config set --local path 'vendor/bundle'
bundle config set --local with 'development'
bundle install
yarn install --check-files

### **Configure hdm**

Expand Down
1 change: 1 addition & 0 deletions app/assets/config/manifest.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@
//= link_tree ../../../vendor/javascript .js
//= link bootstrap
//= link jquery
//= link application.css
7 changes: 3 additions & 4 deletions db/schema.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,14 @@
#
# It's strongly recommended that you check this file into your version control system.

ActiveRecord::Schema[6.1].define(version: 2021_08_31_130006) do

ActiveRecord::Schema[7.0].define(version: 2021_08_31_130006) do
create_table "users", force: :cascade do |t|
t.string "first_name"
t.string "last_name"
t.string "email"
t.string "password_digest"
t.datetime "created_at", precision: 6, null: false
t.datetime "updated_at", precision: 6, null: false
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.boolean "admin", default: false, null: false
t.index ["email"], name: "index_users_on_email", unique: true
end
Expand Down