From 64914fb0d5c603107139b7186708f49beea91141 Mon Sep 17 00:00:00 2001 From: ScientiaSitPotentia Date: Fri, 1 Jan 2021 13:11:22 +0100 Subject: [PATCH] Docker compose support (#54) * added docker-compose files * updated readme with docker-compose instructions * updated default docker-compose data folder --- .env.sample | 3 +++ README.md | 16 ++++++++++++++++ docker-compose.yml | 11 +++++++++++ 3 files changed, 30 insertions(+) create mode 100644 .env.sample create mode 100644 docker-compose.yml diff --git a/.env.sample b/.env.sample new file mode 100644 index 0000000..81dabf3 --- /dev/null +++ b/.env.sample @@ -0,0 +1,3 @@ +LD_CONTAINER_NAME=linkding +LD_HOST_PORT=9090 +LD_HOST_DATA_DIR=./data diff --git a/README.md b/README.md index 0a6e43f..8a9463b 100644 --- a/README.md +++ b/README.md @@ -48,6 +48,22 @@ docker exec -it linkding python manage.py createsuperuser --username=joe --email ``` The command will prompt you for a secure password. After the command has completed you can start using the application by logging into the UI with your credentials. +### Docker-compose setup + +To install linkding using docker-compose you can use the `docker-compose.yml` file. Rename the `.env.sample` file to `.env` and set you parameters, the run: +```shell +docker-compose up -d +``` + +### Docker-compose user setup + +Finally you need to create a user so that you can access the frontend. Replace the credentials in the following command and run it: +```shell +docker-compose exec linkding python manage.py createsuperuser --username=joe --email=joe@example.com +``` +The command will prompt you for a secure password. After the command has completed you can start using the application by logging into the UI with your credentials. + + ### Manual setup If you can not or don't want to use Docker you can install the application manually on your server. To do so you can basically follow the steps from the *Development* section below while cross-referencing the `Dockerfile` and `bootstrap.sh` on how to make the application production-ready. diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..1ecb857 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,11 @@ +version: '3' + +services: + linkding: + container_name: "${LD_CONTAINER_NAME:-linkding}" + image: sissbruecker/linkding:latest + ports: + - "${LD_HOST_PORT:-9090}:9090" + volumes: + - "${LD_HOST_DATA_DIR:-./data}:/etc/linkding/data" + restart: unless-stopped \ No newline at end of file