From 1134d92655aaa7c19c87955e34b2e32bea7d6c20 Mon Sep 17 00:00:00 2001 From: Christoffer Nielsen <6637534+segadora@users.noreply.github.com> Date: Tue, 19 Nov 2024 18:39:49 +0100 Subject: [PATCH] Add docker image for testing (#26) --- Dockerfile | 13 +++++++++++++ README.md | 4 ++++ compose.yaml | 7 +++++++ 3 files changed, 24 insertions(+) create mode 100644 Dockerfile create mode 100644 compose.yaml diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..af5645f --- /dev/null +++ b/Dockerfile @@ -0,0 +1,13 @@ +FROM python:3-alpine + +RUN apk add fontconfig ttf-dejavu + +WORKDIR /app + +COPY . . + +RUN pip install . + +EXPOSE 8013 + +CMD [ "python", "-m", "brother_ql_web", "--configuration", "config.json" ] diff --git a/README.md b/README.md index 4502a63..a2877af 100644 --- a/README.md +++ b/README.md @@ -44,6 +44,10 @@ The most basic call will look like this: Additional parameters might be passed and will overwrite the values configured in your configuration file. Please refer to the `--help` flag to learn more about the possible flags you might pass. +#### Running with Docker compose + +To start the server with Docker compose, create your configuration file `config.json` in the repository root, then run `docker compose up`. + ### Usage Once it is running, access the web interface by opening the page with your browser. diff --git a/compose.yaml b/compose.yaml new file mode 100644 index 0000000..045860d --- /dev/null +++ b/compose.yaml @@ -0,0 +1,7 @@ +services: + brother_ql_web: + build: . + ports: + - "8013:8013" + volumes: + - .:/app