Skip to content

Commit

Permalink
Merge pull request #316 from minnestar/nix-vagrant
Browse files Browse the repository at this point in the history
Nix vagrant
  • Loading branch information
pcantrell authored Jun 9, 2024
2 parents a590e3f + f1c3fc3 commit 55d767d
Show file tree
Hide file tree
Showing 497 changed files with 23 additions and 582 deletions.
13 changes: 4 additions & 9 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,15 @@ jobs:
verify:
runs-on: ubuntu-latest

defaults:
run:
working-directory: ./src

services:
postgres:
image: postgres:latest
ports: ["5432:5432"]
env:
POSTGRES_HOST_AUTH_METHOD: trust
POSTGRES_DB: sessionizer_test
POSTGRES_USER: vagrant
POSTGRES_PASSWORD: vagrant
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres

steps:
- uses: actions/checkout@v4
Expand All @@ -31,7 +27,6 @@ jobs:
with:
ruby-version: 2.7.7
bundler-cache: true
working-directory: ./src

- name: Show Ruby version
run: ruby -v
Expand All @@ -41,8 +36,8 @@ jobs:
CI: github
RAILS_ENV: test
POSTGRES_DB: sessionizer_test
POSTGRES_USER: vagrant
POSTGRES_PASSWORD: vagrant
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
run: |
bundle exec rake db:create db:migrate db:test:prepare
bundle exec rails spec
19 changes: 8 additions & 11 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,17 @@
/.bundle

# Ignore the default SQLite database.
/src/db/*.sqlite3
/db/*.sqlite3

# Ignore all logfiles and tempfiles.
/src/log/*
/src/tmp/*
/src/tmp/cache*
!/src/log/.keep
!/src/tmp/.keep
!/src/tmp/cache/.keep
/log/*
/tmp/*
/tmp/cache*
!/log/.keep
!/tmp/.keep
!/tmp/cache/.keep

.DS_Store
/src/config/database.yml
/config/database.yml

coverage/

.vagrant
vagrant/ansible/*.retry
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
22 changes: 3 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,6 @@ Sessionizer is a tool for managing session registration for unconferences. It wa
git clone [email protected]:minnestar/sessionizer.git
cd sessionizer

# cd into /src folder
cd /src

# install correct ruby version
asdf install ruby # OR
rbenv install # OR
Expand Down Expand Up @@ -60,9 +57,6 @@ createuser -s -r postgres

# create 'sessionizer_development' database
createdb sessionizer_development

# create 'vagrant' user
createuser -s -r vagrant
```

#### Bundle exec
Expand All @@ -75,7 +69,6 @@ bundle exec rails
To run the application

```bash
$ cd /src
$ rails s
```

Expand All @@ -91,7 +84,6 @@ scheduling algorithm.
Locally:

```
$ cd src
$ bundle exec rake app:make_believe
```

Expand All @@ -112,18 +104,10 @@ rails spec
6. Set a MANDRILL_MINNESTAR_USERNAME, MANDRILL_MINNESTAR_PASSWORD - These can be omitted if this app is for testing.
7. Create the first event by navigating to `/admin/events` or using the
console
8. Since the app is in a git subtree (src/ directory), you need to push
the app to heroku like this

from master

```
$ git subtree push --prefix src heroku master
```
8. To deploy the app to heroku:

or from a specific branch with a --force
```
$ git push heroku `git subtree split --prefix src THE_BRANCH_NAME`:master --force
$ git push heroku master
```

## Generating a schedule
Expand All @@ -147,4 +131,4 @@ Minnestar is dedicated to providing a harassment-free experience for everyone. A

## License

This project is open source under the MIT license. See [LICENSE](src/LICENSE.txt) for details.
This project is open source under the MIT license. See [LICENSE](LICENSE.txt) for details.
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
6 changes: 6 additions & 0 deletions bin/pull-database-from-production
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/bin/sh

# This script assumes the existence of a PG user named `postgres`

psql postgres postgres -c 'drop database sessionizer_development;'
PGUSER=postgres heroku pg:pull DATABASE sessionizer_development --app sessionizer2016
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions src/config/database.yml → config/database.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ default: &default
# Database does not work in GitHub Workflows if host parameter is not specified
host: localhost
pool: 5
username: vagrant
password:
username: postgres
password:

development:
<<: *default
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading

0 comments on commit 55d767d

Please sign in to comment.