all repos — myprecious @ d7583eb4604a185c188647b4cc192555e1579119

A lightweight web service to backup precious game saves.

add docker config
Andronaco Marco marco.andronaco@olivetti.com
Thu, 17 Aug 2023 19:07:46 +0200
commit

d7583eb4604a185c188647b4cc192555e1579119

parent

f2bf1ed45b995727e67f19d72f9e00729a1fbc64

3 files changed, 38 insertions(+), 3 deletions(-)

jump to
A Dockerfile

@@ -0,0 +1,12 @@

+FROM tecktron/python-waitress:slim + +RUN pip install --upgrade pip + +WORKDIR /app +COPY ./requirements.txt . +RUN pip install -r requirements.txt + +COPY ./migrations ./migrations +COPY ./myprecious ./myprecious + +ENV APP_MODULE=myprecious:app
M README.mdREADME.md

@@ -2,15 +2,25 @@ # myprecious

## Configuration ``` -poetry install --with prod +cp .env.example .env +nano .env ``` -## Usage +### Docker ``` -poetry run waitress-serve --port 1111 myprecious:app +docker-compose up -d ``` ### Debug ``` +poetry install poetry run flask --app myprecious run --port 1111 --debug ``` + + +## Production +``` +poetry install --with prod +poetry run waitress-serve --port 1111 myprecious:app +``` +
A docker-compose.yaml

@@ -0,0 +1,13 @@

+services: + app: + build: . + image: myprecious:latest + container_name: myprecious + ports: + - 127.0.0.1:1111:80 + volumes: + - /etc/localtime:/etc/localtime:ro + - data:/app/data + - ${PWD}/.env:/app/.env +volumes: + data: