A simple app to generate public links to files. Simply point the service at a directory of files, and after logging in to the UI download links can be created for any file in that directory.
Releases of FileLink are automatically built into a container available at ghcr.io/dpk2442/filelink
.
In the simplest form, the service can be run as follows:
docker run \
--volume <Path to store application data>:/app/data \
--volume <Path to files to serve>:/files \
--publish-all \
ghcr.io/dpk2442/filelink
The container needs two volumes mounted to properly function.
Container Path | Description |
---|---|
/app/data | Directory where the application database and secret key are stored. |
/files | Directory that will be available in the application to create shares from. |
This is the more advanced option, and requires some manual setup. The application should be run using
the filelink.settings.prod
settings, and the requirements.txt
should have all the dependencies
needed to run the application, including uwsgi if desired. See the run.sh
script for a reference of
what commands need to be run to bootstrap the system.
The FL_FILES_PATH
environment variable can be set to override the default files path of /files
. If
using uwsgi.ini
with a non-standard path, be sure to update the static-safe
parameter.
See How to deploy Django for more information about deploying Django applications.
Prequisites:
Clone the project and open it in the container. All of the needed extensions and python dependencies should be automatically installed. Once it finishes, open the shell and run the following commands:
mkdir data
python manage.py migrate
python manage.py generate_secret_key
python manage.py runserver
Prequisites:
Clone the project, navigate into it in the terminal, and run the following commands:
python -m pip install -r requirements_dev.txt
mkdir data
python manage.py migrate
python manage.py generate_secret_key
python manage.py runserver
After making updates to the model classes, create a migration using the following command:
python manage.py makemigrations shares
Tests can be run using pytest
or Django's built in test runner:
python manage.py test
pytest