Skip to content

Commit

Permalink
Fix sqlite db ownership on first run
Browse files Browse the repository at this point in the history
  • Loading branch information
thespad committed Jul 11, 2024
1 parent accf7f3 commit c0260f8
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 13 deletions.
6 changes: 3 additions & 3 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -533,7 +533,7 @@ pipeline {
--label \"org.opencontainers.image.licenses=GPL-3.0-only\" \
--label \"org.opencontainers.image.ref.name=${COMMIT_SHA}\" \
--label \"org.opencontainers.image.title=Manyfold\" \
--label \"org.opencontainers.image.description=[Manyfold](https://github.com/manyfold/manyfold/) is an open source, self-hosted web application for managing a collection of 3D models, particularly focused on 3D printing. \" \
--label \"org.opencontainers.image.description=[Manyfold](https://github.com/manyfold3d/manyfold/) is an open source, self-hosted web application for managing a collection of 3D models, particularly focused on 3D printing. \" \
--no-cache --pull -t ${IMAGE}:${META_TAG} --platform=linux/amd64 \
--provenance=false --sbom=false \
--build-arg ${BUILD_VERSION_ARG}=${EXT_RELEASE} --build-arg VERSION=\"${VERSION_TAG}\" --build-arg BUILD_DATE=${GITHUB_DATE} ."
Expand Down Expand Up @@ -565,7 +565,7 @@ pipeline {
--label \"org.opencontainers.image.licenses=GPL-3.0-only\" \
--label \"org.opencontainers.image.ref.name=${COMMIT_SHA}\" \
--label \"org.opencontainers.image.title=Manyfold\" \
--label \"org.opencontainers.image.description=[Manyfold](https://github.com/manyfold/manyfold/) is an open source, self-hosted web application for managing a collection of 3D models, particularly focused on 3D printing. \" \
--label \"org.opencontainers.image.description=[Manyfold](https://github.com/manyfold3d/manyfold/) is an open source, self-hosted web application for managing a collection of 3D models, particularly focused on 3D printing. \" \
--no-cache --pull -t ${IMAGE}:amd64-${META_TAG} --platform=linux/amd64 \
--provenance=false --sbom=false \
--build-arg ${BUILD_VERSION_ARG}=${EXT_RELEASE} --build-arg VERSION=\"${VERSION_TAG}\" --build-arg BUILD_DATE=${GITHUB_DATE} ."
Expand Down Expand Up @@ -594,7 +594,7 @@ pipeline {
--label \"org.opencontainers.image.licenses=GPL-3.0-only\" \
--label \"org.opencontainers.image.ref.name=${COMMIT_SHA}\" \
--label \"org.opencontainers.image.title=Manyfold\" \
--label \"org.opencontainers.image.description=[Manyfold](https://github.com/manyfold/manyfold/) is an open source, self-hosted web application for managing a collection of 3D models, particularly focused on 3D printing. \" \
--label \"org.opencontainers.image.description=[Manyfold](https://github.com/manyfold3d/manyfold/) is an open source, self-hosted web application for managing a collection of 3D models, particularly focused on 3D printing. \" \
--no-cache --pull -f Dockerfile.aarch64 -t ${IMAGE}:arm64v8-${META_TAG} --platform=linux/arm64 \
--provenance=false --sbom=false \
--build-arg ${BUILD_VERSION_ARG}=${EXT_RELEASE} --build-arg VERSION=\"${VERSION_TAG}\" --build-arg BUILD_DATE=${GITHUB_DATE} ."
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@ Find us at:
[![Jenkins Build](https://img.shields.io/jenkins/build?labelColor=555555&logoColor=ffffff&style=for-the-badge&jobUrl=https%3A%2F%2Fci.linuxserver.io%2Fjob%2FDocker-Pipeline-Builders%2Fjob%2Fdocker-manyfold%2Fjob%2Fmain%2F&logo=jenkins)](https://ci.linuxserver.io/job/Docker-Pipeline-Builders/job/docker-manyfold/job/main/)
[![LSIO CI](https://img.shields.io/badge/dynamic/yaml?color=94398d&labelColor=555555&logoColor=ffffff&style=for-the-badge&label=CI&query=CI&url=https%3A%2F%2Fci-tests.linuxserver.io%2Flinuxserver%2Fmanyfold%2Flatest%2Fci-status.yml)](https://ci-tests.linuxserver.io/linuxserver/manyfold/latest/index.html)

[Manyfold](https://github.com/manyfold/manyfold/) is an open source, self-hosted web application for managing a collection of 3D models, particularly focused on 3D printing.
[Manyfold](https://github.com/manyfold3d/manyfold/) is an open source, self-hosted web application for managing a collection of 3D models, particularly focused on 3D printing.

[![manyfold](https://raw.githubusercontent.com/linuxserver/docker-templates/master/linuxserver.io/img/manyfold-logo.png)](https://github.com/manyfold/manyfold/)
[![manyfold](https://raw.githubusercontent.com/linuxserver/docker-templates/master/linuxserver.io/img/manyfold-logo.png)](https://github.com/manyfold3d/manyfold/)

## Supported Architectures

Expand All @@ -59,9 +59,9 @@ The architectures supported by this image are:

## Application Setup

This container *requires* a separate Redis/Valkey instance to run. Sqlite is supported but we recommend an external postgresql database for better performance.
This container *requires* a separate Redis/Valkey instance to run. Sqlite is supported but we recommend an external Postgres or MariaDB database for better performance.

To generate keys for `SECRET_KEY_BASE` run `docker run --rm -it --entrypoint /bin/bash lscr.io/linuxserver/manyfold:latest generate-secret` once for each.
To generate keys for `SECRET_KEY_BASE` you can run `docker run --rm -it --entrypoint /bin/bash lscr.io/linuxserver/manyfold:latest generate-secret`.

You don't have to use `/libraries` and you're not limited to a single path, you can mount as many arbitrary paths as you like as long as you make sure the permissions match the user running the container.

Expand Down
6 changes: 3 additions & 3 deletions readme-vars.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# project information
project_name: manyfold
project_url: "https://github.com/manyfold/manyfold/"
project_url: "https://github.com/manyfold3d/manyfold/"
project_logo: "https://raw.githubusercontent.com/linuxserver/docker-templates/master/linuxserver.io/img/manyfold-logo.png"
project_blurb: |
[{{ project_name|capitalize }}]({{ project_url }}) is an open source, self-hosted web application for managing a collection of 3D models, particularly focused on 3D printing.
Expand Down Expand Up @@ -38,9 +38,9 @@ opt_param_volumes:
# application setup block
app_setup_block_enabled: true
app_setup_block: |
This container *requires* a separate Redis/Valkey instance to run. Sqlite is supported but we recommend an external postgresql database for better performance.
This container *requires* a separate Redis/Valkey instance to run. Sqlite is supported but we recommend an external Postgres or MariaDB database for better performance.
To generate keys for `SECRET_KEY_BASE` run `docker run --rm -it --entrypoint /bin/bash lscr.io/linuxserver/manyfold:latest generate-secret` once for each.
To generate keys for `SECRET_KEY_BASE` you can run `docker run --rm -it --entrypoint /bin/bash lscr.io/linuxserver/manyfold:latest generate-secret`.
You don't have to use `/libraries` and you're not limited to a single path, you can mount as many arbitrary paths as you like as long as you make sure the permissions match the user running the container.
Expand Down
5 changes: 2 additions & 3 deletions root/etc/s6-overlay/s6-rc.d/init-manyfold-config/run
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ DB_SCHEME=$(awk -F":" '{print $1}' <<<"${DATABASE_URL}")
if [[ ${DB_SCHEME} = "sqlite3" ]]; then
DB_PATH=$(awk -F":" '{print $2}' <<<"${DATABASE_URL}")
touch "${DB_PATH}"
lsiown -R abc:abc \
/config
elif [[ ${DB_SCHEME} = "postgresql" ]]; then
DB_HOST=$(awk -F"@|:" '{print $4}' <<<"${DATABASE_URL}")
DB_PORT=$(awk -F"@|/" '{print $6}' <<<"${DATABASE_URL}")
Expand Down Expand Up @@ -63,6 +65,3 @@ fi
cd /app/www/ || exit 1

s6-setuidgid abc /usr/bin/bundle exec rails db:prepare:with_data

lsiown -R abc:abc \
/config

0 comments on commit c0260f8

Please sign in to comment.