more nix
This commit is contained in:
parent
c34e3a60e4
commit
bd9c80eb08
32
README.md
32
README.md
|
@ -6,41 +6,25 @@ Its web interface is hosted at
|
|||
[https://vergadering.bij1.org/ingang/rooms/](https://vergadering.bij1.org/ingang/rooms/).
|
||||
|
||||
## requirements
|
||||
- [Ruby](https://www.ruby-lang.org/)
|
||||
- [Rake](https://ruby.github.io/rake/)
|
||||
- [Bundler](https://bundler.io/)
|
||||
|
||||
## dependencies
|
||||
|
||||
- [rvm](https://rvm.io/)
|
||||
- [Nix](https://nix.dev/)
|
||||
|
||||
## usage
|
||||
|
||||
```bash
|
||||
# install ruby version specified in Gemfile
|
||||
rvm use "ruby-2.7.5"
|
||||
# create a wrapper for this ruby
|
||||
PUMA=`gem wrappers show pumactl`
|
||||
|
||||
cp config/application.yml.bck config/application.yml.bck
|
||||
nix-shell
|
||||
cp config/application.yml.bck config/application.yml
|
||||
# edit the above file to enter proper values
|
||||
./bin/bundle config set --local path 'vendor'
|
||||
./bin/bundle update
|
||||
./bin/bundle install
|
||||
./bin/bundle binstubs --all
|
||||
./bin/rails app:update:bin
|
||||
./bin/rails credentials:edit
|
||||
rails credentials:edit
|
||||
# either restore existing data
|
||||
cp old/config/master.key ./config/master.key
|
||||
cp old/db/production.sqlite3 ./db/production.sqlite3
|
||||
# or scaffold database
|
||||
./bin/rails db:migrate # RAILS_ENV=test
|
||||
rails db:migrate # RAILS_ENV=test
|
||||
# handle static assets
|
||||
sudo apt-get update && sudo apt-get install yarn
|
||||
RAILS_ENV=production ./bin/rails assets:precompile
|
||||
./bin/rails webpacker:install
|
||||
RAILS_ENV=production rails assets:precompile
|
||||
rails webpacker:install
|
||||
# run tests
|
||||
./bin/rake test
|
||||
rake test
|
||||
|
||||
# create service
|
||||
sudo bash -c "cat > /etc/systemd/system/ingang.service" << EOF
|
||||
|
|
Loading…
Reference in New Issue