From eaf689be97e0a4626afd9bb76a8a43f21cc0ea33 Mon Sep 17 00:00:00 2001 From: Raelon Masters Date: Tue, 7 Apr 2020 14:45:27 -0400 Subject: [PATCH] Still working on the post install execution of Docker --- Dockerfile | 2 +- create_db.sql | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 20e51fe..6510ce4 100644 --- a/Dockerfile +++ b/Dockerfile @@ -17,7 +17,7 @@ ENV PYTHONUNBUFFERED=1 VOLUME ['/srv/Books','/srv/http','/srv/logs'] WORKDIR /srv/http RUN git clone https://github.com/th3r00t/pyShelf.git /srv/http && \ - git checkout 0.5.0--docker && pip install -r requirements.txt + git checkout 0.5.0--docker && git fetch && pip install -r requirements.txt # RUN sudo -u postgres pg_ctl -D /var/lib/postgres/data -l /srv/logs/pgsql.log start # RUN sudo -u postgres psql -f create_db.sql # RUN gunicorn pyShelf.wsgi 8000:8000 diff --git a/create_db.sql b/create_db.sql index 4c09394..9308ad0 100755 --- a/create_db.sql +++ b/create_db.sql @@ -1 +1 @@ -CREATE DATABASE pyshelf; CREATE USER pyshelf WITH PASSWORD pyshelf; GRANT ALL PRIVILEGES ON DATABASE pyshelf TO pyshelf; +CREATE DATABASE 'pyshelf'; CREATE USER 'pyshelf' WITH PASSWORD 'pyshelf'; GRANT ALL PRIVILEGES ON DATABASE 'pyshelf' TO 'pyshelf';