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

Update DEPLOYMENT.md #98

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
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
25 changes: 21 additions & 4 deletions DEPLOYMENT.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,31 @@ Change the default URL options' `:host` in `config/environments/production.rb` t
Edit `~/nginx/conf/nginx.conf` like so:

```
server {
daemon off;
worker_processes 1;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Double space

events {
worker_connections 1024;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indent

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And double space

}

http {
set_real_ip_from 127.0.0.1;
set_real_ip_from ::1;
real_ip_header X-Forwarded-For;
include mime.types;
passenger_root /home/ACCOUNT/.gem/ruby/2.4.0/gems/passenger-5.2.0;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm das dünkt mich wackelig, da es absolute Ruby- und Gem-Versionen drin hat. Sowas ähnliches hat (meiner Erinnerung nach) früher auch Probleme gemacht, wenn man Gems oder .ruby-version aktualisiert hat.

Gibt's da keine Möglichkeit, dies bei Runtime direkt zu evaluieren?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Das ist so. Hier könnte man mittels rbenv ggf. was machen. Habe das aber jetzt noch nie ausgetestet. Ich würde sagen, wir lassen hier einfach mal ein Platzhalter stehen und ich dokumentiere, wie man den Pfad heraus findet.

default_type application/octet-stream;
server {
passenger_ruby /package/host/localhost/ruby-2.4.3/bin/ruby;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ebenfalls wackelig.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Auch hier könnte man es mit rbenv entschärfen. Dann wäre der Pfad ~/.rbenv/shims/ruby oder so.

listen PORT; # Choose an open port (see instructions below)!
server_name ACCOUNT.SERVER.uberspace.de;
root /home/ACCOUNT/rails/current/public;
root /home/ACCOUMNT/rails/current/public;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo ACCOUMNT.

passenger_enabled on;

# Be sure to remove or comment the `location / { ... }` block!
}
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bitte generell Indent und Spacing optimieren.

}


```

- To check whether a port is open, execute `netstat -tulpen | grep :PORT`: empty output means the port is open, otherwise the blocking process is displayed.
Expand Down Expand Up @@ -182,4 +199,4 @@ Thunderbird:

## Additional information

- If you ever have to inspect server logs, they're here: `/home/ACCOUNT/nginx/logs/error.log`
- If you ever have to inspect server logs, they're here: `/home/ACCOUNT/nginx/logs/error.log`