Skip to content

Commit 07fea8b

Browse files
authored
Merge pull request #196 from zorglube/clever-cloud
Clever cloud deployment config
2 parents adf00fb + c52b549 commit 07fea8b

File tree

1 file changed

+65
-45
lines changed

1 file changed

+65
-45
lines changed

readme.md

Lines changed: 65 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -10,31 +10,27 @@
1010
- [docker-compose](#docker-compose)
1111
- [Notes for Running Using docker-compose](#notes-for-running-using-docker-compose)
1212
- [FreeNAS / TrueNAS / FreeBSD build and run](#freenas-freebsd-build-and-run)
13+
- [Clever-Cloud deployment and run](#clever-cloud-deployment-and-run)
1314
- [Usage](#usage)
1415
- [Configuration](#configuration)
1516

1617
<!-- markdown-toc end -->
1718
# MovieNight stream server
1819
[![Build status](https://api.travis-ci.org/zorchenhimer/MovieNight.svg?branch=master)](https://travis-ci.org/zorchenhimer/MovieNight)
1920

20-
This is a single-instance streaming server with chat. Originally written to
21-
replace Rabbit as the platform for watching movies with a group of people
22-
online.
21+
This is a single-instance streaming server with chat. Originally written to replace Rabbit as the platform for watching movies with a group of people online.
2322

2423
## Build requirements
2524
- Go 1.16 or newer
2625
- GNU Make
2726

2827
### Older Go Versions
29-
You can install a newer version of Go alongside your OS's distribution by
30-
following the guide here: [https://golang.org/doc/manage-install](https://golang.org/doc/manage-install)
28+
You can install a newer version of Go alongside your OS's distribution by following the guide here: [https://golang.org/doc/manage-install](https://golang.org/doc/manage-install)
3129

32-
Once you have that setup add an enviromnent variable named `GO_VERSION` and
33-
set it to the version you installed (eg, `1.16.1`). The Makefile will now use
34-
the newer version.
30+
Once you have that setup add an enviromnent variable named `GO_VERSION` and set it to the version you installed (eg, `1.16.1`). The Makefile will now use the newer version.
3531

3632
### Compile and install
37-
You have to :
33+
You have to:
3834
- download `git clone https://github.com/zorchenhimer/MovieNight`, go into the source directory `cd MovieNight`;
3935
- run `go build`
4036

@@ -44,7 +40,7 @@ If you want to cross compile instead of running `go build`:
4440
- build `make TARGET=windows ARCH=386` (On BSD systems use `gmake`);
4541
- and run `./MovieNight`;
4642

47-
Example :
43+
Example:
4844
```shell
4945
$ git clone https://github.com/zorchenhimer/MovieNight
5046
$ cd MovieNight
@@ -97,8 +93,41 @@ The container needs to be restarted to apply any changes you make to *settings.j
9793
A [FreeNAS & TrueNAS plugin](https://github.com/zorglube/iocage-plugin-movienight) had been released. You should find MovieNight into the plugin section of you management GUI. However you still can make an manual plugin deployment, documentation [here](https://github.com/freenas/iocage-ix-plugins)
9894
If you prefer to make an Jail without using the plugin management, a script wich setup an Jail and build and run MovieNight into that Jail as been written, you'll find it here [freenas-iocage-movienight](https://github.com/zorglube/freenas-iocage-movienight)
9995

96+
### Clever-Cloud deployment and run
97+
If you don't like to handle the build and run of your MovieNight instance, here is an samll manual of "how to make it run on [Clever-Cloud](https://www.clever-cloud.com)".
98+
Into your Clever-Cloud dashboard:
99+
- Create a "Brand New App" and choose `Go` runtime instance
100+
- Name it, choose your datacenter
101+
- You don't neet any "Add-On", unless you want to provide some Emotes to you MovieNight instance
102+
- Add thoses environement-variables (expert mode allow you copy past frome this page):
103+
`CC_GO_BUILD_TOOL="gobuild"` Set The build method
104+
`CC_GO_PKG="github.com/zorchenhimer/MovieNight"` Set the `Go` dependencies origin
105+
`CC_PRE_RUN_HOOK="echo \"{\\\"ApprovedEmotes\\\": true, \\\"Bans\\\": [], \\\"LetThemLurk\\\": false, \\\"ListenAddress\\\": \\\":8080\\\", \\\"LogFile\\\": \\\"thelog.log\\\", \\\"LogLevel\\\": \\\"debug\\\", \\\"MaxMessageCount\\\": 300, \\\"NoCache\\\": false, \\\"NewPin\\\": true, \\\"PageTitle\\\": \\\"Movie Night\\\", \\\"RateLimitAuth\\\": 5, \\\"RateLimitChat\\\": 1, \\\"RateLimitColor\\\": 60, \\\"RateLimitDuplicate\\\": 30, \\\"RateLimitNick\\\": 300, \\\"RegenAdminPass\\\": true, \\\"RtmpListenAddress\\\": \\\":4040\\\", \\\"RoomAccess\\\": \\\"pin\\\", \\\"RoomAccessPin\\\": \\\"9999\\\", \\\"StreamKey\\\": \\\"ALongStreamKey\\\", \\\"StreamStats\\\": true, \\\"TitleLength\\\": 50, \\\"WrappedEmotesOnly\\\": true}\" >> /home/bas/go_home/bin/settings.json"` The command that will build a default configuration file `settings.json`
106+
`CC_RUN_COMMAND="${MN_BIN_DIR}/${MN_BIN_NAME} -l ${MN_PORT} -r ${MN_RTMP} -s ${MN_STATIC} -k ${MN_STREAM_KEY}"` The run command
107+
`MN_BIN_DIR="/home/bas/go_home/bin"` The built binary directory
108+
`MN_BIN_NAME="MovieNight"` The name of the runnable bin
109+
`MN_PORT=":8080"` The http port
110+
`MN_RTMP=":4040"` The rtmp port
111+
`MN_STATIC="${APP_HOME}/static"` The static contents dir
112+
`MN_STREAM_KEY="YourStreamKey"` Your secret stream key, you have to change it
113+
- Turn on the TCP redirection
114+
- Try run your MovieNight instance
115+
116+
```text
117+
CC_GO_BUILD_TOOL="gobuild"
118+
CC_GO_PKG="github.com/zorchenhimer/MovieNight"
119+
CC_PRE_RUN_HOOK="echo \"{\\\"ApprovedEmotes\\\": true, \\\"Bans\\\": [], \\\"LetThemLurk\\\": false, \\\"ListenAddress\\\": \\\":8080\\\", \\\"LogFile\\\": \\\"thelog.log\\\", \\\"LogLevel\\\": \\\"debug\\\", \\\"MaxMessageCount\\\": 300, \\\"NoCache\\\": false, \\\"NewPin\\\": true, \\\"PageTitle\\\": \\\"Movie Night\\\", \\\"RateLimitAuth\\\": 5, \\\"RateLimitChat\\\": 1, \\\"RateLimitColor\\\": 60, \\\"RateLimitDuplicate\\\": 30, \\\"RateLimitNick\\\": 300, \\\"RegenAdminPass\\\": true, \\\"RtmpListenAddress\\\": \\\":4040\\\", \\\"RoomAccess\\\": \\\"pin\\\", \\\"RoomAccessPin\\\": \\\"9999\\\", \\\"StreamKey\\\": \\\"ALongStreamKey\\\", \\\"StreamStats\\\": true, \\\"TitleLength\\\": 50, \\\"WrappedEmotesOnly\\\": true}\" >> /home/bas/go_home/bin/settings.json"
120+
CC_RUN_COMMAND="${MN_BIN_DIR}/${MN_BIN_NAME} -l ${MN_PORT} -r ${MN_RTMP} -s ${MN_STATIC} -k ${MN_STREAM_KEY}"
121+
MN_BIN_DIR="/home/bas/go_home/bin"
122+
MN_BIN_NAME="MovieNight"
123+
MN_PORT=":8080"
124+
MN_RTMP=":4040"
125+
MN_STATIC="${APP_HOME}/static"
126+
MN_STREAM_KEY="YourStreamKey"
127+
```
128+
100129
## Usage
101-
Now you can use OBS to push a stream to the server. Set the stream URL to
130+
Now you can use OBS to push a stream to the server. Set the stream URL to
102131

103132
```text
104133
rtmp://your.domain.host/live
@@ -124,8 +153,7 @@ and a chat only version at
124153
http://your.domain.host:8089/chat
125154
```
126155

127-
The default listen port is `:8089`. It can be changed by providing a new port
128-
at startup:
156+
The default listen port is `:8089`. It can be changed by providing a new port at startup:
129157

130158
```text
131159
Usage of .\MovieNight.exe:
@@ -144,37 +172,29 @@ Usage of .\MovieNight.exe:
144172
## Configuration
145173
MovieNight’s configuration is controlled by `settings.json`:
146174

147-
- `AdminPassword`: users can enter `/auth <value>` into chat to grant themselves
148-
admin privileges. This value is automatically regenerated unless
149-
`RegenAdminPass` is false.
150-
- `Bans`: list of banned users.
151-
- `LetThemLurk`: if false, announces when a user enters and leaves chat.
152-
- `ListenAddress`: the port that MovieNight listens on, formatted as `:8089`.
153-
- `LogFile`: the path of the MovieNight logfile, relative to the executable.
154-
- `LogLevel`: the log level, defaults to `debug`.
155-
- `MaxMessageCount`: the number of messages displayed in the chat window.
156-
- `NewPin`: if true, regenerates `RoomAccessPin` when the server starts.
157-
- `PageTitle`: The base string used in the `<title>` element of the page. When
158-
the stream title is set with `/playing`, it is appended; e.g., `Movie Night | The Man Who Killed Hitler and Then the Bigfoot`
159-
- `RegenAdminPass`: if true, regenerates `AdminPassword` when the server starts.
160-
- `RoomAccess`: the access policy of the chat room; this is managed by the
161-
application and should not be edited manually.
162-
- `RoomAccessPin`: if set, serves as the password required to enter the chatroom.
163-
- `SessionKey`: key used for storing session data (cookies etc.)
164-
- `StreamKey`: the key that OBS will use to connect to MovieNight.
165-
- `StreamStats`: if true, prints statistics for the stream on server shutdown.
166-
- `TitleLength`: the maximum allowed length for the stream title (set with `/playing`).
167-
- `WrappedEmotesOnly`: if true, requires that emote codes be wrapped in colons
168-
or brackets; e.g., `:PogChamp:`
169-
- `RateLimitChat`: the number of seconds between each message a non-privileged
170-
user can post in chat.
171-
- `RateLimitNick`: the number of seconds before a user can change their nick again.
172-
- `RakeLimitColor`: the number of seconds before a user can change their color again.
173-
- `RateLimitAuth`: the number of seconds between each allowed auth attempt
174-
- `RateLimitDuplicate`: the numeber of seconds before a user can post a
175-
duplicate message.
176-
- `NoCache`: if true, set `Cache-Control: no-cache, must-revalidate` in the HTTP
177-
header, to prevent caching responses.
175+
- `AdminPassword`: users can enter `/auth <value>` into chat to grant themselves admin privileges. This value is automatically regenerated unless `RegenAdminPass` is false.
176+
- `Bans`: list of banned users.
177+
- `LetThemLurk`: if false, announces when a user enters and leaves chat.
178+
- `ListenAddress`: the port that MovieNight listens on, formatted as `:8089`.
179+
- `LogFile`: the path of the MovieNight logfile, relative to the executable.
180+
- `LogLevel`: the log level, defaults to `debug`.
181+
- `MaxMessageCount`: the number of messages displayed in the chat window.
182+
- `NewPin`: if true, regenerates `RoomAccessPin` when the server starts.
183+
- `PageTitle`: The base string used in the `<title>` element of the page. When the stream title is set with `/playing`, it is appended; e.g., `Movie Night | The Man Who Killed Hitler and Then the Bigfoot`
184+
- `RegenAdminPass`: if true, regenerates `AdminPassword` when the server starts.
185+
- `RoomAccess`: the access policy of the chat room; this is managed by the application and should not be edited manually.
186+
- `RoomAccessPin`: if set, serves as the password required to enter the chatroom.
187+
- `SessionKey`: key used for storing session data (cookies etc.)
188+
- `StreamKey`: the key that OBS will use to connect to MovieNight.
189+
- `StreamStats`: if true, prints statistics for the stream on server shutdown.
190+
- `TitleLength`: the maximum allowed length for the stream title (set with `/playing`).
191+
- `WrappedEmotesOnly`: if true, requires that emote codes be wrapped in colons or brackets; e.g., `:PogChamp:`
192+
- `RateLimitChat`: the number of seconds between each message a non-privileged user can post in chat.
193+
- `RateLimitNick`: the number of seconds before a user can change their nick again.
194+
- `RakeLimitColor`: the number of seconds before a user can change their color again.
195+
- `RateLimitAuth`: the number of seconds between each allowed auth attempt.
196+
- `RateLimitDuplicate`: the numeber of seconds before a user can post a duplicate message.
197+
- `NoCache`: if true, set `Cache-Control: no-cache, must-revalidate` in the HTTP header, to prevent caching responses.
178198

179199
## License
180-
`flv.js` is Licensed under the Apache 2.0 license. This project is licened under the MIT license.
200+
`flv.js` is Licensed under the Apache 2.0 license. This project is licened under the MIT license.

0 commit comments

Comments
 (0)