-
Notifications
You must be signed in to change notification settings - Fork 0
Suggested maintenance of readme and template #13
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This line should also be removed There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We don't use solar graph anymore...
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. file ".env", <<~ENV ease development with this puma settingsWEB_CONCURRENCY=0 we don't user .env files for projects. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. file ".prettierrc", <<~JS this should be updated to use the default prettier which is double quotes. (remove the single quote) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. file "Procfile.dev", <<~PROC live reload doesn't work on our projects. It should be removed. (add the configuration for vite at a later point. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. file "package.json", <<~JS remove livereload as it doesnt' work. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. All the javascript files should use double quotes There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. file ".github/workflows/ci.yml", <<~YML
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. file "spec/support/system/cuprite_setup.rb", <<~RUBY frozen_string_literal: truerequire "capybara/cuprite" Then, we need to register our driver to be able to use it laterwith #driven_by method.Capybara.register_driver(:cuprite) do |app| Config.headless?(default: true) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. run "yarn add -D @typescript-eslint/eslint-plugin @typescript-eslint/parser eslint eslint-config-prettier eslint-plugin-prettier prettier livereload" remove live reload |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,7 @@ | |
ruby File.read(".ruby-version").strip | ||
|
||
# Core | ||
gem "rails", "7.0.3" | ||
gem "rails", "7.1.2" | ||
gem "puma" | ||
|
||
# Database | ||
|
@@ -61,7 +61,6 @@ | |
gem "rb-fsevent" | ||
gem "letter_opener" | ||
gem "debug" | ||
gem "pry-rails" | ||
gem "guard" | ||
gem "guard-rspec" | ||
gem "solargraph-standardrb" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. we also dropped solar graph. |
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,7 @@ This project contains all dependencies and services required by other nerdgescho | |
|
||
### Auto-Start Mode | ||
|
||
To have the environment start automatically when _Docker_ start, execute the following command once. | ||
To have the environment start automatically when _Docker_ starts, execute the following command once. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. we don't use docker-compose on most projects at the moment. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. that is why I removed it in lines 92-97. As of Docker Compose V2 it uses the syntax below in line 11 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We don't use Docker Compose directly in the projects, but (at least for me) the development environment (Postgres, MySQL, Redis, Elasticsearch, etc) is running via Docker Compose the whole time. I assumed that's what these lines are referencing. |
||
|
||
docker compose up -d | ||
|
||
|
@@ -22,9 +22,13 @@ Here we will go over how to setup rails for the first time on your machine. | |
|
||
We will mostly follow Rails [Getting Started Guide](https://guides.rubyonrails.org/getting_started.html) with some changes. | ||
|
||
## rbenv | ||
## Manage versions of languages and runtime environment | ||
|
||
First thing we need is a version manager for Ruby. We use rbenv at nerdgeschoss. | ||
You can use `asdf` to manage multiple tools. Check out the [guide](https://asdf-vm.com/guide/getting-started.html) for more, or use distinct managers as described below. | ||
|
||
### rbenv | ||
|
||
`rbenv` is a version manager for Ruby. | ||
|
||
brew install rbenv | ||
|
||
|
@@ -34,6 +38,10 @@ You can check your ruby version by typing this in your project folder: | |
|
||
If a version is not installed, you can add it by `rbenv install x.x.x`. | ||
|
||
### node | ||
|
||
Make sure you have node installed. Use volta as your version manager, follow the steps as decribed in the [docs](https://docs.volta.sh/guide/). | ||
|
||
## Rails | ||
|
||
Now let’s install Rails. | ||
|
@@ -54,6 +62,10 @@ Then you will need to run this to install the ruby dependencies. | |
|
||
bundle install | ||
|
||
Or for short just | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't think we need to include the short hand in our docs. 🤔 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I can remove it. I felt it does not hurt to go a bit into detail though. |
||
|
||
bundle | ||
|
||
### MySQL Troubleshooting | ||
|
||
During the bundle install you may face an error with mysql, in that case just follow the instructions on the error. | ||
|
@@ -89,12 +101,6 @@ If `bundle install` fails for the GEM `pg`, install `postgresql`: | |
|
||
brew install postgresql | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this will not work on the projects that need postgres 15. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. that line has not changed. What change would you suggest? |
||
|
||
## docker-compose | ||
|
||
Now to setup we development environment we use `docker-compose`. | ||
|
||
docker-compose up | ||
|
||
## yarn | ||
|
||
Now to install the Javascript dependencies we use `yarn`. | ||
|
@@ -111,6 +117,12 @@ To resolve dependencies of a project: | |
|
||
Now let’s setup up the database. | ||
|
||
For most projects there should be a setup script available. | ||
|
||
bin/setup | ||
|
||
If that does not work, follow these steps: | ||
|
||
First we create the database. | ||
|
||
rails db:create | ||
|
@@ -125,14 +137,44 @@ Then we will seed our database with fake data for testing. | |
|
||
If you are interested in finding out what is going on behind the scenes (because it’s doing a lot and you will feel like the process just hanged) you can use `tail log/development.log` to hook into and view the log file. | ||
|
||
## Rails Server | ||
## Start the application | ||
|
||
Now that we have everything setup, we can start by running | ||
|
||
bin/dev | ||
|
||
This sets up everything you need such as a rails server, a background worker and a second server for the frontend if needed. | ||
You can connect to the a session in a new terminal tab with | ||
|
||
Now that we have everything setup we can finally start the server. | ||
overmind c web | ||
|
||
for the server, and | ||
|
||
overmind c worker | ||
|
||
for the background worker. | ||
|
||
In the background there are these processes running: | ||
|
||
### Rails Server | ||
|
||
This is how to manually start the server. | ||
|
||
rails s | ||
|
||
The default app port is `3000`, so if you navigate to [localhost:3000](https://localhost:3000) you should see a page (depending on the project). | ||
|
||
### Sidekiq | ||
|
||
We use sidekiq for background jobs. If you start the server manually use a new terminal tab to run: | ||
|
||
sidekiq | ||
|
||
### frontend | ||
|
||
Please refer to the readme of the specific project for information. | ||
In most cases the default port for the frontend will be `8080` ([localhost:8080](https://localhost:8080)). | ||
|
||
## guard | ||
|
||
With the above setup we will see our code changes when we refresh the page, but to make our development life easier we will also do the following. | ||
|
@@ -141,12 +183,6 @@ Run `guard` to watch for changed files, reload our website on change and re-run | |
|
||
guard | ||
|
||
Run a `webpack` dev server to make our javascript updates faster. | ||
|
||
bin/webpack-dev-server | ||
|
||
With that in place you can start developing. | ||
|
||
# Feature Specific Installations: | ||
|
||
## imagemagick | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
postgres post should also be
54313