mirror of
https://github.com/th3r00t/pyShelf.git
synced 2026-04-28 01:59:35 -04:00
Added new configs, bootstrap hatch with pip, and updated dockerfile.
This commit is contained in:
13
docker/Dockerfile
vendored
13
docker/Dockerfile
vendored
@@ -9,18 +9,17 @@
|
|||||||
# docker login
|
# docker login
|
||||||
# docker push pyshelf/pyshelf
|
# docker push pyshelf/pyshelf
|
||||||
|
|
||||||
FROM ubuntu
|
FROM python:3
|
||||||
|
|
||||||
EXPOSE 8000
|
EXPOSE 8000
|
||||||
EXPOSE 1337
|
EXPOSE 1337
|
||||||
|
|
||||||
RUN apt-get update -y
|
# RUN apt-get update -y
|
||||||
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y build-essential python3.12 python3.12-dev python3.12-pip python3.12-venv python3.12-hatch
|
# RUN DEBIAN_FRONTEND=noninteractive apt-get install -y build-essential python312 python312-dev python312-pip python312-venv python312-hatch
|
||||||
|
|
||||||
COPY . /pyshelf
|
COPY . /pyshelf
|
||||||
COPY ./docker/config.json /pyshelf/config.json
|
COPY ./docker/config.json /pyshelf/config.json
|
||||||
|
COPY ./docker/requirements.txt /pyshelf/requirements.txt
|
||||||
WORKDIR /pyshelf/
|
WORKDIR /pyshelf/
|
||||||
RUN python3.12 -m hatch shell
|
RUN python -m pip install --no-cache-dir -r requirements.txt
|
||||||
|
ENTRYPOINT hatch run ./pyShelf.py
|
||||||
ENTRYPOINT python3.12 pyshelf.py
|
|
||||||
|
|||||||
20
docker/config.json
vendored
20
docker/config.json
vendored
@@ -1 +1,19 @@
|
|||||||
{"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"}
|
{
|
||||||
|
"TITLE": "pyShelf E-Book Server",
|
||||||
|
"VERSION": "0.8.0",
|
||||||
|
"BOOKPATH": "/books",
|
||||||
|
"DB_HOST": "localhost",
|
||||||
|
"DB_PORT": "5432",
|
||||||
|
"DB_ENGINE": "psql",
|
||||||
|
"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"
|
||||||
|
}
|
||||||
|
|||||||
1
docker/requirements.txt
vendored
Normal file
1
docker/requirements.txt
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
hatch
|
||||||
Reference in New Issue
Block a user