mirror of
https://github.com/th3r00t/pyShelf.git
synced 2026-04-28 01:59:35 -04:00
Adding docker directory with docker support
This commit is contained in:
2
config.json
vendored
2
config.json
vendored
@@ -1 +1 @@
|
|||||||
{"TITLE": "pyShelf E-Book Server", "VERSION": "0.5.0", "BOOKPATH": "", "DB_HOST": "db", "DB_PORT": "5432", "DATABASE": "pyshelf", "USER": "pyshelf", "PASSWORD": "mysecretpassword", "BOOKSHELF": "data/shelf.json", "ALLOWED_HOSTS": "*", "hostname": "localhost", "webport": "8000", "wsgiport": "8001"}
|
{"TITLE": "pyShelf E-Book Server", "VERSION": "0.5.0", "BOOKPATH": "", "DB_HOST": "db", "DB_PORT": "5432", "DATABASE": "pyshelf", "USER": "pyshelf", "PASSWORD": "pyshelf", "BOOKSHELF": "data/shelf.json", "ALLOWED_HOSTS": "*", "hostname": "localhost", "webport": "8000", "wsgiport": "8001"}
|
||||||
|
|||||||
6
docker/.env
vendored
Normal file
6
docker/.env
vendored
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
LOCAL_BOOK_DIR=/home/marvin/git/hatpyShelf/docker/Books/
|
||||||
|
PORT=8088
|
||||||
|
POSTGRES_VER=12.2
|
||||||
|
POSTGRES_USER=pyshelf
|
||||||
|
POSTGRES_PASSWORD=pyshelf
|
||||||
|
POSTGRES_DB=pyshelf
|
||||||
18
docker/Dockerfile
vendored
Normal file
18
docker/Dockerfile
vendored
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
# docker build -t ubuntu1604py36
|
||||||
|
FROM ubuntu:18.04
|
||||||
|
|
||||||
|
RUN apt-get update && apt-get install -y software-properties-common
|
||||||
|
RUN add-apt-repository ppa:deadsnakes/ppa
|
||||||
|
RUN apt-get update -y
|
||||||
|
|
||||||
|
RUN apt-get install -y build-essential python3.8 python3.8-dev python3-pip python3.8-venv && apt-get install -y git
|
||||||
|
|
||||||
|
# update pip
|
||||||
|
RUN python3 -m pip install wheel
|
||||||
|
RUN git clone https://github.com/hat/pyShelf.git /usr/src/app/
|
||||||
|
RUN python3 -m pip install -r /usr/src/app/requirements.txt
|
||||||
|
#CMD [""]
|
||||||
|
#RUN python3 manage.py migrate
|
||||||
|
#RUN python3 manage.py migrate interface
|
||||||
|
WORKDIR /usr/src/app/src/
|
||||||
|
CMD ["python3", "manage.py", "runserver"]
|
||||||
21
docker/docker-compose.yml
vendored
Normal file
21
docker/docker-compose.yml
vendored
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
version: "3.3"
|
||||||
|
services:
|
||||||
|
db:
|
||||||
|
image: "postgres:${POSTGRES_VER}"
|
||||||
|
environment:
|
||||||
|
- "POSTGRES_PASSWORD=${POSTGRES_PASSWORD}"
|
||||||
|
- "POSTGRES_USER=${POSTGRES_USER}"
|
||||||
|
- "POSTGRES_DB=${POSTGRES_DB}"
|
||||||
|
|
||||||
|
pyshelf:
|
||||||
|
build:
|
||||||
|
context: ./
|
||||||
|
dockerfile: Dockerfile
|
||||||
|
volumes:
|
||||||
|
- "${LOCAL_BOOK_DIR}:/Books"
|
||||||
|
ports:
|
||||||
|
- "8088:8000"
|
||||||
|
links:
|
||||||
|
- "db:db"
|
||||||
|
depends_on:
|
||||||
|
- db
|
||||||
1
requirements.txt
vendored
1
requirements.txt
vendored
@@ -17,3 +17,4 @@ psycopg2-binary
|
|||||||
prompt_toolkit
|
prompt_toolkit
|
||||||
psutil
|
psutil
|
||||||
pyfiglet
|
pyfiglet
|
||||||
|
pudb
|
||||||
|
|||||||
Reference in New Issue
Block a user