Install instructions
This app is meant to be executed locally within your home network: no extra attention
was paid to security regarding external attacks or access management.
You can however put it behind
basic auth
and/or other restrictions via either
nginx
or
apache
, use
your own
local
VPN
, or a
SSH tunnel
.
Since version 0.30.0 you can enable basic auth within the app via the basic_auth field in Menu > Tools > Settings .
Since version 0.30.0 you can enable basic auth within the app via the basic_auth field in Menu > Tools > Settings .
1. Initial installation
You can do a
local installation
or use a
docker image
: they are functionally equals however the
local installation
can run external programs installed in the same system (like a file manager,
terminal, image editor, ...) but the
docker image
cannot.
1.1 Using
docker
# download image
docker pull ryogachan/djmngr:latest
# run image
docker run --rm -ti --name djmngr \
-p "3000:3000" \
-v /path/to/db:/app/storage \
-v /path/to/library:/app/dj-library \
-v /path/to/epub:/app/public/epub \
-v /path/to/thumbs:/app/public/thumbs \
-v /path/to/samples:/app/public/samples \
ryogachan/djmngr
1.2 Using
docker-compose
# download image
docker pull ryogachan/djmngr:latest
# download and customize docker-compose file
wget https://github.com/ryoga-chan/djmngr/raw/main/docker/compose.yml
# edit port/folders in compose.yml, then:
docker compose up -d # start app in background
docker compose down # stop app
1.3 Local installation
# install prerequisites
apt install coreutils findutils grep zip unzip \
libkakasi2-dev libsqlite3-0 sqlite3 p7zip-full nodejs \
libvips-dev libjpeg62-turbo-dev libpng-dev webp imagemagick
# install optional tools
apt install mcomix thunar xfce4-terminal
# install ruby (you can use RBENV, RVM, or system package)
curl -sSL https://get.rvm.io | bash -s stable
rvm install "3.3.0" # match version in `ruby 'x.y.z'` line within Gemfile
# clone repository
git clone https://github.com/ryoga-chan/djmngr.git
cd djmngr
# install gems
bundle install
# run database migrations
RAILS_ENV=production ./bin/rails db:migrate
# run standalone server
RAILS_SERVE_STATIC_FILES=true ./bin/server p
PHASHION_USE_GITHUB_SRC=true bundle install
PHASHION_USE_GITHUB_SRC=true RAILS_ENV=production ./bin/rails db:migrate
PHASHION_USE_GITHUB_SRC=true RAILS_SERVE_STATIC_FILES=true ./bin/server p
Note:
It is
recommended
to run the server with
./bin/server p
behind a
reverse proxy
like Nginx or Apache because they are better at serving many static files
(e.g. take a look at this project's
nginx.conf
file).
2. Post installation
- Configure the app in the Menu > Tools > Settings page
- Your database is stored in the file /app_dir/storage/production.sqlite3
- EPUB files are saved in /app_dir/public/epub/
- ZIP thumbnails are stored in /app_dir/public/thumbs/
3. How to update
3.1 Docker
Just increase the image version tag or pull again the
latest
tag then run it, database migrations will run automatically.
3.2 Local installation
git pull # update sources
bundle install # update gems
# run database migrations
RAILS_ENV=production ./bin/rails db:migrate