瀏覽代碼

polish readme and add nginx and systemd examples

also move examples into separate subdir to keep it tidy
milaq 6 年之前
父節點
當前提交
f983d2500d
共有 4 個文件被更改,包括 38 次插入4 次删除
  1. 8 4
      README.md
  2. 18 0
      examples/nginx-ycast.conf.example
  3. 0 0
      examples/stations.yml.example
  4. 12 0
      examples/ycast.service.example

+ 8 - 4
README.md

@@ -1,3 +1,5 @@
+<img src="https://image.ibb.co/iBY6hq/yamaha.png" width="600">
+
 # YCast
 
 YCast is a self hosted replacement for the vTuner internet radio service which some Yamaha AVRs use.
@@ -46,7 +48,7 @@ Category two name:
   Fourth awesome station name: fourth.awesome/station/URL
 ```   
 
-You can also have a look at the provided [example](stations.yml.example) to better understand the configuration.
+You can also have a look at the provided [example](examples/stations.yml.example) to better understand the configuration.
 
 
 ## Web server configuration
@@ -65,6 +67,9 @@ You need to redirect the following URLs from your webserver to YCast (listening
 
 __Attention__: Do not rewrite the request transparently. YCast expects the complete URL (i.e. including `/ycast/`).
 
+In case you are using (or plan on using) Nginx to proxy requests, have a look at [this example](examples/nginx-ycast.conf.example).
+This can be used together with [this systemd service example](examples/ycast.service.example) for a fully functional deployment.
+
 ## Firewall rules
 
  * The server running YCast does __not__ need internet access
@@ -76,6 +81,5 @@ __Attention__: Do not rewrite the request transparently. YCast expects the compl
 YCast was a quick and dirty project to lay the foundation for having a self hosted vTuner emulation.
 
 It is a barebone service at the moment. It provides your AVR with the basic info it needs to play internet radio stations. 
-Maybe this will change in the future.
-But for now just station names and URLs. No web-based management interface, no coverart, no fancy stuff.
-
+Maybe this will change in the future, maybe not.
+For now just station names and URLs; no web-based management interface, no coverart, no cute kittens, no fancy stuff.

+ 18 - 0
examples/nginx-ycast.conf.example

@@ -0,0 +1,18 @@
+server {
+        listen 80;
+        server_name radioyamaha.vtuner.com;
+
+        access_log /var/log/nginx/ycast_access.log;
+        error_log /var/log/nginx/ycast_error.log;
+
+        location / {
+                proxy_redirect  off;
+
+                proxy_set_header Host $host;
+                proxy_set_header X-Real-IP $remote_addr;
+                proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
+                proxy_set_header X-Forwarded-Proto $scheme;
+
+                proxy_pass http://localhost:8010;
+        }
+}

+ 0 - 0
stations.yml.example → examples/stations.yml.example


+ 12 - 0
examples/ycast.service.example

@@ -0,0 +1,12 @@
+[Unit]
+Description=YCast internet radio service
+After=network.target
+
+[Service]
+Type=simple
+User=ycast
+Group=ycast
+ExecStart=/opt/ycast/ycast.py -l 127.0.0.1 -p 8010
+
+[Install]
+WantedBy=multi-user.target