Skip to content

Commit

Permalink
Merge pull request #3 from FabienChaynes/better-onboarding
Browse files Browse the repository at this point in the history
Make local installation easier
  • Loading branch information
pstrzalk authored Oct 14, 2024
2 parents 3db4e05 + ec1dc7d commit a9f1dd4
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 27 deletions.
2 changes: 0 additions & 2 deletions .env.development.example

This file was deleted.

4 changes: 2 additions & 2 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ gem "bootsnap", require: false
group :development, :test do
# See https://guides.rubyonrails.org/debugging_rails_applications.html#debugging-with-the-debug-gem
gem "debug"

gem "sqlite3", "~> 1.6", ">= 1.6.6"
end

group :development do
Expand All @@ -66,5 +68,3 @@ group :test do
gem "capybara"
gem "selenium-webdriver"
end

gem "dotenv", "~> 3.1"
11 changes: 9 additions & 2 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,6 @@ GEM
debug (1.9.2)
irb (~> 1.10)
reline (>= 0.3.8)
dotenv (3.1.4)
drb (2.2.1)
erubi (1.12.0)
ffi (1.17.0)
Expand Down Expand Up @@ -243,6 +242,14 @@ GEM
actionpack (>= 5.2)
activesupport (>= 5.2)
sprockets (>= 3.0.0)
sqlite3 (1.7.3)
mini_portile2 (~> 2.8.0)
sqlite3 (1.7.3-aarch64-linux)
sqlite3 (1.7.3-arm-linux)
sqlite3 (1.7.3-arm64-darwin)
sqlite3 (1.7.3-x86-linux)
sqlite3 (1.7.3-x86_64-darwin)
sqlite3 (1.7.3-x86_64-linux)
stimulus-rails (1.3.3)
railties (>= 6.0.0)
stringio (3.1.0)
Expand Down Expand Up @@ -294,7 +301,6 @@ DEPENDENCIES
bootsnap
capybara
debug
dotenv (~> 3.1)
hotwire-livereload
importmap-rails
jbuilder
Expand All @@ -304,6 +310,7 @@ DEPENDENCIES
redis (>= 4.0.1)
selenium-webdriver
sprockets-rails
sqlite3 (~> 1.6, >= 1.6.6)
stimulus-rails
tailwindcss-rails
turbo-rails
Expand Down
11 changes: 1 addition & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,15 +52,6 @@ Follow these steps to set up the project locally:
```

3. Set up the database:
- Copy the example environment file:
```
cp .env.development.example .env.development
```
- Edit `.env.development` and set your database credentials:
```
DB_USERNAME=your_username
DB_PASSWORD=your_password
```
- Create database, run migrations and seed data:
```
rails db:setup
Expand All @@ -71,4 +62,4 @@ Follow these steps to set up the project locally:
bin/dev # use to enable tailwind and hot reload
```
5. Visit `http://localhost:3000` in your web browser to see the application running.
5. Visit `http://localhost:3000` or `http://0.0.0.0:3000` in your web browser to see the application running (Google maps won't work otherwise).
14 changes: 6 additions & 8 deletions config/database.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,9 @@ default: &default

development:
<<: *default
database: ruby_community_development
username: <%= ENV['DB_USERNAME'] || 'ruby_community' %>
password: <%= ENV['DB_PASSWORD'] || 'password' %>
host: <%= ENV['DB_HOST'] || '127.0.0.1' %>
adapter: sqlite3
database: storage/development.sqlite3
timeout: 5000

# The specified database role being used to connect to PostgreSQL.
# To create additional roles in PostgreSQL see `$ createuser --help`.
Expand Down Expand Up @@ -58,10 +57,9 @@ development:
# Do not set this db to the same as development or production.
test:
<<: *default
database: ruby_community_test
username: <%= ENV['DB_USERNAME'] || 'ruby_community' %>
password: <%= ENV['DB_PASSWORD'] || 'password' %>
host: <%= ENV['DB_HOST'] || '127.0.0.1' %>
adapter: sqlite3
database: storage/test.sqlite3
timeout: 5000

# As with config/credentials.yml, you never want to store sensitive information,
# like your database password, in your source code. If your source code is
Expand Down
3 changes: 0 additions & 3 deletions db/schema.rb

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit a9f1dd4

Please sign in to comment.