EveryDocs Core is the server-side part of EveryDocs. This project contains a web interface. All in all, EveryDocs is a simple Document Management System (DMS) for private use. It contains basic functionality to organize your documents digitally.
secret_key
(generated for example by openssl rand -hex 32
) and changing the flag encryption_actived_flag
in the users
database table for each user
The easiest way to get started is to use Docker Compose. The docker-compose.yaml
creates three containers for the database, Everydocs Core (available on port 5678) and the web interface (available on port 8080 and 8443).
You may simply need to changed the URL in ./everydocs-web-config.js
where EveryDocs Core will be accessible and execute the following command while being inside the source folder of this repository:
SECRET_KEY_BASE="$(openssl rand -hex 64)" docker-compose up --build
Start the container and make the API accessible on port 8080
by running the following commands. Of course, you can change the port in the last command.
Also make sure to check the folder that is mounted into the container. In this case, the uploaded files are stored in /data/everydocs
on the host.
docker run -p 127.0.0.1:8080:5678/tcp -e SECRET_KEY_BASE="$(openssl rand -hex 64)" -v /data/everydocs:/var/everydocs-files jonashellmann/everydocs
You can configure the application by using the following environment variables:
EVERYDOCS_DB_ADAPTER
: The database adapter (default: mysql2
)EVERYDOCS_DB_NAME
: The name of the database (default: everydocs
)EVERYDOCS_DB_USER
: The user for the database connection (default: everydocs
)EVERYDOCS_DB_PASSWORD
: The password for the database connection (no default)EVERYDOCS_DB_HOST
: The host of the database (default: localhost
)EVERYDOCS_DB_PORT
: The port of the database (default: 3306
)You might want to include this container in a network so it has access to a database container. Also there are ways to connect to a database that runs on the host (e.g. see Stackoverflow).
gem install rails
EVERYDOCS_DB_ADAPTER
(e.g. mysql2), EVERYDOCS_DB_NAME
, EVERYDOCS_DB_USER
, EVERYDOCS_DB_PASSWORD
, EVERYDOCS_DB_HOST
, EVERYDOCS_DB_PORT
.
You can do so by editing the start-app.sh
script./var/everydocs-files/
.bundle install
start-app.sh
and stop-app.sh
.rake db:migrate RAILS_ENV=production
. If there is an error, you might need to execute the following command, to
set an encryption key: EDITOR="mate --wait" bin/rails credentials:edit
SECRET_KEY_BASE
has a value.
If not, you can generate a key by running rake secret
and set it by editing the start-app.sh
script.
In case your not using production as your environment, the environment variable SECRET_KEY_BASE_DEV
or SECRET_KEY_BASE_TEST
needs to be set../start-app.sh
./stop-app.sh
To backup your application, you can simply use the backup functionality of your database. For example, a MySQL/MariaDB DBMS may use mysqldump.
Additionally you have to backup the place where the documents are stored. You can configure this in config/settings.yml. To restore, just put the documents back in that location.
To learn about the routes the API offers, run the following command: rake routes