diff --git a/docker/Dockerfile b/docker/Dockerfile index 8508064..7fc4b9c 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -1,6 +1,6 @@ -# This file is used to build the Dockerhub image. To host pyShelf yourself for -# production, please use the official pyShelf image on +# This file is used to build the Dockerhub image. To host pyShelf yourself for +# production, please use the official pyShelf image on # https://hub.docker.com/r/pyshelf/pyshelf # Use the following commands to build and push the docker image to Dockerhub: @@ -15,14 +15,12 @@ EXPOSE 8000 EXPOSE 1337 RUN apt-get update -y -RUN DEBIAN_FRONTEND=noninteractive apt-get install -y build-essential python3 python3-dev python3-pip python3-venv +RUN DEBIAN_FRONTEND=noninteractive apt-get install -y build-essential python3.12 python3.12-dev python3.12-pip python3.12-venv python3.12-hatch COPY . /pyshelf COPY ./docker/config.json /pyshelf/config.json WORKDIR /pyshelf/ -RUN python3 -m pip install -r requirements.txt +RUN python3.12 -m hatch shell -ENTRYPOINT python3 configure \ - && cd src/ \ - && daphne -b 0.0.0.0 -p 8000 frontend.asgi:application +ENTRYPOINT python3.12 pyshelf.py diff --git a/docker/config.json b/docker/config.json index 8aff6e8..1f578d7 100644 --- a/docker/config.json +++ b/docker/config.json @@ -1 +1 @@ -{"TITLE": "pyShelf E-Book Server", "VERSION": "0.7.0", "BOOKPATH": "/books", "DB_HOST": "localhost", "DB_PORT": "5432", "DATABASE": "pyshelf", "USER": "pyshelf", "PASSWORD": "pyshelf", "BOOKSHELF": "data/shelf.json", "ALLOWED_HOSTS": ["localhost", "127.0.0.1", "[::1]", "0.0.0.0"], "SECRET": "", "BUILD_MODE": "production"} +{"TITLE": "pyShelf E-Book Server", "VERSION": "0.8.0", "BOOKPATH": "/books", "DB_HOST": "localhost", "DB_PORT": "5432", "DATABASE": "pyshelf", "USER": "pyshelf", "PASSWORD": "pyshelf", "BOOKSHELF": "data/shelf.json", "ALLOWED_HOSTS": ["localhost", "127.0.0.1", "[::1]", "0.0.0.0"], "BUILD_MODE": "production"}