aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam Chudnick <sam@chudnick.com>2023-06-10 07:30:48 -0400
committerSam Chudnick <sam@chudnick.com>2023-06-10 07:30:48 -0400
commitc811af252a46010dccae5c5778d64c45cf47d332 (patch)
treea72c055fc58525f9f4804223fd66ae805e75d62b
parentf9333c86086aacd6dc89fbb6a29aac90c4089024 (diff)
Added docker components and README.
-rw-r--r--Dockerfile32
-rw-r--r--README.md23
-rwxr-xr-xsrc/run.sh2
3 files changed, 56 insertions, 1 deletions
diff --git a/Dockerfile b/Dockerfile
new file mode 100644
index 0000000..e1f4b9a
--- /dev/null
+++ b/Dockerfile
@@ -0,0 +1,32 @@
1FROM debian:bullseye
2
3EXPOSE 8000
4
5WORKDIR /app
6
7COPY src ./src
8
9RUN apt update -y && apt install -y \
10 python3-tz \
11 python3-flask \
12 python3-flaskext.wtf \
13 python3-requests \
14 python3-wtforms \
15 && apt clean \
16 && rm -rf /var/cache/apt
17
18ENTRYPOINT ["/app/src/run.sh"]
19
20LABEL maintainer="searxng <${GIT_URL}>" \
21 description="Weather Application" \
22 version="0.1" \
23 org.label-schema.schema-version="1.0" \
24 org.label-schema.name="pywttr" \
25 org.label-schema.version="0.1" \
26 org.label-schema.url="https://gitea.chudnick.com/sam/pywttr" \
27 org.opencontainers.image.title="pywttr" \
28 org.opencontainers.image.version="0.1" \
29 org.opencontainers.image.url="https://gitea.chudnick.com/sam/pywttr" \
30 org.opencontainers.image.revision="0.1" \
31 org.opencontainers.image.source="https://gitea.chudnick.com/sam/pywttr" \
32 org.opencontainers.image.documentation="https://gitea.chudnick.com/sam/pywttr" \
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..a658b10
--- /dev/null
+++ b/README.md
@@ -0,0 +1,23 @@
1# pywttr-docker
2
3pywttr-docker is a lightweight docker web application for getting
4weather information from any location in the world.
5
6The application uses the FOSS Open-Meteo API to retrieve this information
7without any API key or paid subscriptions to services like OpenWeatherMap.
8
9# setup
10
11## clone the repository
12```
13git clone https://git.chudnick.com/pywttr-docker
14```
15## build the image
16```
17docker build -t pywttr:latest pywttr-docker/Dockerfile
18```
19## run the container
20```
21docker run -d -p 8000:8000 --name pywttr pywttr:latest
22```
23
diff --git a/src/run.sh b/src/run.sh
index 0d36b89..282c615 100755
--- a/src/run.sh
+++ b/src/run.sh
@@ -1,2 +1,2 @@
1#!/bin/sh 1#!/bin/sh
2flask run 2FLASK_APP=/app/src/app.py flask run -p 8000 -h "0.0.0.0"