Skip to content
This repository was archived by the owner on Jan 3, 2025. It is now read-only.

Commit 75163c7

Browse files
authored
Merge pull request #15 from linuxserver/proto-regression
Fix protocol regression
2 parents 9b84da7 + c05c1d0 commit 75163c7

File tree

4 files changed

+42
-21
lines changed

4 files changed

+42
-21
lines changed

README.md

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -87,13 +87,15 @@ services:
8787
- PUID=1000
8888
- PGID=1000
8989
- TZ=Etc/UTC
90-
- QUASSEL_CORE=192.168.1.10
91-
- QUASSEL_PORT=4242
90+
- QUASSEL_CORE=192.168.1.10 #optional
91+
- QUASSEL_PORT=4242 #optional
92+
- QUASSEL_HTTPS= #optional
9293
- URL_BASE=/quassel #optional
9394
volumes:
9495
- /path/to/data:/config
9596
ports:
96-
- 64443:64443
97+
- 64080:64080 #optional
98+
- 64443:64443 #optional
9799
restart: unless-stopped
98100
```
99101
@@ -105,10 +107,12 @@ docker run -d \
105107
-e PUID=1000 \
106108
-e PGID=1000 \
107109
-e TZ=Etc/UTC \
108-
-e QUASSEL_CORE=192.168.1.10 \
109-
-e QUASSEL_PORT=4242 \
110+
-e QUASSEL_CORE=192.168.1.10 `#optional` \
111+
-e QUASSEL_PORT=4242 `#optional` \
112+
-e QUASSEL_HTTPS= `#optional` \
110113
-e URL_BASE=/quassel `#optional` \
111-
-p 64443:64443 \
114+
-p 64080:64080 `#optional` \
115+
-p 64443:64443 `#optional` \
112116
-v /path/to/data:/config \
113117
--restart unless-stopped \
114118
lscr.io/linuxserver/quassel-web:latest
@@ -120,12 +124,14 @@ Containers are configured using parameters passed at runtime (such as those abov
120124

121125
| Parameter | Function |
122126
| :----: | --- |
127+
| `-p 64080` | Quassel-web http webui |
123128
| `-p 64443` | Quassel-web https webui |
124129
| `-e PUID=1000` | for UserID - see below for explanation |
125130
| `-e PGID=1000` | for GroupID - see below for explanation |
126131
| `-e TZ=Etc/UTC` | specify a timezone to use, see this [list](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones#List). |
127132
| `-e QUASSEL_CORE=192.168.1.10` | specify the URL or IP address of your Quassel Core instance |
128133
| `-e QUASSEL_PORT=4242` | specify the port of your Quassel Core instance |
134+
| `-e QUASSEL_HTTPS=` | Set to `true` to have Quassel web serve over https on port 64443 instead of http on port 64080. |
129135
| `-e URL_BASE=/quassel` | Specify a url-base in reverse proxy setups ie. `/quassel` |
130136
| `-v /config` | this will store config on the docker host |
131137

readme-vars.yml

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,17 +15,18 @@ param_container_name: "{{ project_name }}"
1515
param_usage_include_vols: true
1616
param_volumes:
1717
- {vol_path: "/config", vol_host_path: "/path/to/data", desc: "this will store config on the docker host"}
18-
param_usage_include_env: true
19-
param_env_vars:
20-
- {env_var: "QUASSEL_CORE", env_value: "192.168.1.10", desc: "specify the URL or IP address of your Quassel Core instance"}
21-
- {env_var: "QUASSEL_PORT", env_value: "4242", desc: "specify the port of your Quassel Core instance"}
22-
param_usage_include_ports: true
23-
param_ports:
24-
- {external_port: "64443", internal_port: "64443", port_desc: "Quassel-web https webui"}
25-
# optional container parameters
18+
param_usage_include_env: false
2619
opt_param_usage_include_env: true
2720
opt_param_env_vars:
21+
- {env_var: "QUASSEL_CORE", env_value: "192.168.1.10", desc: "specify the URL or IP address of your Quassel Core instance"}
22+
- {env_var: "QUASSEL_PORT", env_value: "4242", desc: "specify the port of your Quassel Core instance"}
23+
- {env_var: "QUASSEL_HTTPS", env_value: "", desc: "Set to `true` to have Quassel web serve over https on port 64443 instead of http on port 64080."}
2824
- {env_var: "URL_BASE", env_value: "/quassel", desc: "Specify a url-base in reverse proxy setups ie. `/quassel`"}
25+
param_usage_include_ports: false
26+
opt_param_usage_include_ports: true
27+
opt_param_ports:
28+
- {external_port: "64080", internal_port: "64080", port_desc: "Quassel-web http webui"}
29+
- {external_port: "64443", internal_port: "64443", port_desc: "Quassel-web https webui"}
2930
# application setup block
3031
app_setup_block_enabled: true
3132
app_setup_block: "By default this container webui will be available on `https://$SERVER_IP:64443`. To setup this container you can either use the environment variables we recommend or manually setup the configuration file by leaving out the `QUASSEL_CORE` environment variable among others. \nThe configuration file using this method can be found at:\n```\n/config/settings-user.js\n```\n"

root/etc/s6-overlay/s6-rc.d/init-quassel-web-config/run

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,14 +33,20 @@ done
3333
echo "QUASSEL_CORE set, injecting env variables into settings.cjs"
3434
cp -pr /app/quassel-web/settings.cjs /app/quassel-web/settings-env.cjs
3535
# Env variable injection
36-
sed -i \
37-
-e "s#host:.*//#host: '${QUASSEL_CORE}', //#g" \
38-
-e "s#port:.*,// quasselcore#port: ${QUASSEL_PORT}, // quasselcore#g" \
39-
/app/quassel-web/settings-env.cjs && \
36+
sed -i \
37+
-e "s#host:.*//#host: '${QUASSEL_CORE}', //#g" \
38+
-e "s#port:.*,// quasselcore#port: ${QUASSEL_PORT}, // quasselcore#g" \
39+
/app/quassel-web/settings-env.cjs && \
4040
if [[ "${URL_BASE+x}" ]]; then
4141
sed -i "s#prefixpath:.*//#prefixpath: \'${URL_BASE}\', //#g"
4242
/app/quassel-web/settings-env.cjs
4343
fi
44+
if [[ -z "${QUASSEL_HTTPS}" ]]; then
45+
sed -i \
46+
-e "s#mode:.*// can be 'http'#mode: 'http', // can be 'http'#g" \
47+
-e "s#port:.*// Port on which to listen#port: 64080, // Port on which to listen#g" \
48+
/app/quassel-web/settings-env.cjs
49+
fi
4450

4551
# file permissions
4652
chownfiles

root/etc/s6-overlay/s6-rc.d/svc-quassel-web/run

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,14 @@ fi
99

1010
export NODE_ENV=production
1111

12-
exec \
13-
s6-notifyoncheck -d -n 300 -w 1000 -c "nc -z localhost 64443" \
14-
cd /app/quassel-web s6-setuidgid abc node app.js --config "${CONFIG}"
12+
PORT=$(sed -n '/webserver: {/,/},/p' "${CONFIG}" | grep 'port:' | awk -F ':' '{print $2}' | cut -f1 -d ',' | tr -d '[:space:]')
13+
14+
if [[ "${PORT}" != "null" ]]; then
15+
exec \
16+
s6-notifyoncheck -d -n 300 -w 1000 -c "nc -z localhost ${PORT}" \
17+
cd /app/quassel-web s6-setuidgid abc node app.js --config "${CONFIG}"
18+
else
19+
exec \
20+
s6-notifyoncheck -d -n 300 -w 1000 -c "true" \
21+
cd /app/quassel-web s6-setuidgid abc node app.js --config "${CONFIG}"
22+
fi

0 commit comments

Comments
 (0)