From 0876b3953befd4e5e71aa33c04edb91dc2edd4ba Mon Sep 17 00:00:00 2001 From: Tony Hendrick Date: Thu, 14 May 2020 11:29:50 -0700 Subject: [PATCH] docker-compose is now functional added a cronjob in the pyShelf container to update the Books directory every 5 minutes went back to using a variable for the exposed port --- README.md | 10 ++++++++++ docker/.env | 2 +- docker/docker-compose.yml | 3 ++- 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index f822b92..6ddd054 100755 --- a/README.md +++ b/README.md @@ -78,6 +78,16 @@ All configuration is now handled by the installer. Running via the Django test server might be possible, albeit not recomended. +## Docker + +Installation for Docker is handled by docker-compose + +It will spin up two containers: one postgres, one for the Django application + +Edit [docker/.env](docker.env) +`sudo docker-compose -f docker/docker-compose.yml --env-file docker/.env build` +`sudo docker-compose -f docker/docker-compose.yml --env-file=docker/.env up -d` + ### In Progress #### Organizational tools. diff --git a/docker/.env b/docker/.env index c86c711..75596a2 100644 --- a/docker/.env +++ b/docker/.env @@ -1,4 +1,4 @@ -LOCAL_BOOK_DIR=/home/marvin/git/hatpyShelf/docker/Books/ +LOCAL_BOOK_DIR=~/Books #This directory will be craeted otherwise link to the directory containing your .epub files PORT=8088 POSTGRES_VER=12.2 POSTGRES_USER=pyshelf diff --git a/docker/docker-compose.yml b/docker/docker-compose.yml index 5996c88..4b87e6e 100644 --- a/docker/docker-compose.yml +++ b/docker/docker-compose.yml @@ -13,8 +13,9 @@ services: dockerfile: Dockerfile volumes: - "${LOCAL_BOOK_DIR}:/usr/src/app/Books" + - "./cron/root:/etc/crontabs/root" ports: - - "8088:8000" + - "${PORT}:8000" links: - "db:db" depends_on: