Skip to content

Commit f7a5e24

Browse files
authored
Merge pull request #15 from linuxserver/buildfix
Buildfix
2 parents 6e56b4d + 69a93b6 commit f7a5e24

File tree

5 files changed

+24
-4
lines changed

5 files changed

+24
-4
lines changed

Dockerfile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,9 @@ ENV RAILS_ENV="production" \
1818

1919
RUN \
2020
apk add --no-cache \
21-
assimp \
21+
assimp-dev \
2222
file \
23+
gcompat \
2324
glfw \
2425
imagemagick \
2526
imagemagick-heic \
@@ -72,6 +73,7 @@ RUN \
7273
touch db/schema.rb && \
7374
DATABASE_URL="nulldb://user:pass@localhost/db" \
7475
SECRET_KEY_BASE="placeholder" \
76+
APP_VERSION=${MANYFOLD_VERSION} \
7577
bundle exec rake assets:precompile && \
7678
rm db/schema.rb && \
7779
printf "Linuxserver.io version: ${VERSION}\nBuild-date: ${BUILD_DATE}" > /build_version && \

Dockerfile.aarch64

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,9 @@ ENV RAILS_ENV="production" \
1818

1919
RUN \
2020
apk add --no-cache \
21-
assimp \
21+
assimp-dev \
2222
file \
23+
gcompat \
2324
glfw \
2425
imagemagick \
2526
imagemagick-heic \
@@ -72,6 +73,7 @@ RUN \
7273
touch db/schema.rb && \
7374
DATABASE_URL="nulldb://user:pass@localhost/db" \
7475
SECRET_KEY_BASE="placeholder" \
76+
APP_VERSION=${MANYFOLD_VERSION} \
7577
bundle exec rake assets:precompile && \
7678
rm db/schema.rb && \
7779
printf "Linuxserver.io version: ${VERSION}\nBuild-date: ${BUILD_DATE}" > /build_version && \

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ Containers are configured using parameters passed at runtime (such as those abov
124124
| `-e TZ=Etc/UTC` | specify a timezone to use, see this [list](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones#List). |
125125
| `-e DATABASE_URL=` | Database connection URL. For sqlite use `sqlite3:/config/manyfold.sqlite3`. For postgres or mariadb use `<scheme>://<username>:<password>@<hostname>:<port>/<db name>` where `<scheme>` is `postgresql` or `mysql2`. Special characters in username/password must be [URL encoded](https://en.wikipedia.org/wiki/Percent-encoding). |
126126
| `-e REDIS_URL=` | Redis/Valkey database URL in `redis://<hostname>:<port>/<db number>` format. |
127-
| `-e SECRET_KEY_BASE=` | Browser session secret. Changing it will terminate all active browser sessions. |
127+
| `-e SECRET_KEY_BASE=` | Browser session and database encryption key. If unset a random one will be generated on init, the database is locked to this key. |
128128
| `-v /config` | Persistent storage for application configuration data. |
129129
| `-v /libraries` | Location of your 3D model libraries. |
130130

@@ -290,6 +290,7 @@ Once registered you can define the dockerfile to use with `-f Dockerfile.aarch64
290290

291291
## Versions
292292

293+
* **08.10.25:** - Change key init to auto generate and persist.
293294
* **27.07.25:** - Rebase to Alpine 3.22.
294295
* **12.01.25:** - Rebase to Alpine 3.21.
295296
* **23.07.24:** - Initial Release.

readme-vars.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ param_usage_include_env: true
2222
param_env_vars:
2323
- {env_var: "DATABASE_URL", env_value: "", desc: "Database connection URL. For sqlite use `sqlite3:/config/manyfold.sqlite3`. For postgres or mariadb use `<scheme>://<username>:<password>@<hostname>:<port>/<db name>` where `<scheme>` is `postgresql` or `mysql2`. Special characters in username/password must be [URL encoded](https://en.wikipedia.org/wiki/Percent-encoding)."}
2424
- {env_var: "REDIS_URL", env_value: "", desc: "Redis/Valkey database URL in `redis://<hostname>:<port>/<db number>` format."}
25-
- {env_var: "SECRET_KEY_BASE", env_value: "", desc: "Browser session secret. Changing it will terminate all active browser sessions."}
25+
- {env_var: "SECRET_KEY_BASE", env_value: "", desc: "Browser session and database encryption key. If unset a random one will be generated on init, the database is locked to this key."}
2626
param_usage_include_ports: true
2727
param_ports:
2828
- {external_port: "3214", internal_port: "3214", port_desc: "Port for web frontend"}
@@ -84,6 +84,7 @@ init_diagram: |
8484
"manyfold:latest" <- Base Images
8585
# changelog
8686
changelogs:
87+
- {date: "08.10.25:", desc: "Change key init to auto generate and persist."}
8788
- {date: "27.07.25:", desc: "Rebase to Alpine 3.22."}
8889
- {date: "12.01.25:", desc: "Rebase to Alpine 3.21."}
8990
- {date: "23.07.24:", desc: "Initial Release."}

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

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,20 @@
11
#!/usr/bin/with-contenv bash
22
# shellcheck shell=bash
33

4+
# set secret key if unset
5+
SECRET_FILE="/config/secret_key_base.txt"
6+
if [ -n "${SECRET_KEY_BASE}" ]; then
7+
echo "**** SECRET_KEY_BASE set in environment. ****"
8+
elif [ -f "${SECRET_FILE}" ] && [ -s "${SECRET_FILE}" ]; then
9+
export SECRET_KEY_BASE=$(cat "${SECRET_FILE}" | tr -d '[:space:]')
10+
else
11+
echo "**** SECRET_KEY_BASE not set, generating. ****"
12+
KEY=$(ruby -r "securerandom" -e "puts SecureRandom.hex(64)")
13+
echo "${KEY}" > "${SECRET_FILE}"
14+
export SECRET_KEY_BASE="${KEY}"
15+
fi
16+
printf "%s" "${SECRET_KEY_BASE}" > /var/run/s6/container_environment/SECRET_KEY_BASE
17+
418
mkdir -p \
519
/app/www/log \
620
/app/www/tmp

0 commit comments

Comments
 (0)