diff options
author | Sam Chudnick <sam@chudnick.com> | 2023-06-10 07:30:48 -0400 |
---|---|---|
committer | Sam Chudnick <sam@chudnick.com> | 2023-06-10 07:30:48 -0400 |
commit | c811af252a46010dccae5c5778d64c45cf47d332 (patch) | |
tree | a72c055fc58525f9f4804223fd66ae805e75d62b | |
parent | f9333c86086aacd6dc89fbb6a29aac90c4089024 (diff) |
Added docker components and README.
-rw-r--r-- | Dockerfile | 32 | ||||
-rw-r--r-- | README.md | 23 | ||||
-rwxr-xr-x | src/run.sh | 2 |
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 @@ | |||
1 | FROM debian:bullseye | ||
2 | |||
3 | EXPOSE 8000 | ||
4 | |||
5 | WORKDIR /app | ||
6 | |||
7 | COPY src ./src | ||
8 | |||
9 | RUN 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 | |||
18 | ENTRYPOINT ["/app/src/run.sh"] | ||
19 | |||
20 | LABEL 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 | |||
3 | pywttr-docker is a lightweight docker web application for getting | ||
4 | weather information from any location in the world. | ||
5 | |||
6 | The application uses the FOSS Open-Meteo API to retrieve this information | ||
7 | without any API key or paid subscriptions to services like OpenWeatherMap. | ||
8 | |||
9 | # setup | ||
10 | |||
11 | ## clone the repository | ||
12 | ``` | ||
13 | git clone https://git.chudnick.com/pywttr-docker | ||
14 | ``` | ||
15 | ## build the image | ||
16 | ``` | ||
17 | docker build -t pywttr:latest pywttr-docker/Dockerfile | ||
18 | ``` | ||
19 | ## run the container | ||
20 | ``` | ||
21 | docker run -d -p 8000:8000 --name pywttr pywttr:latest | ||
22 | ``` | ||
23 | |||
@@ -1,2 +1,2 @@ | |||
1 | #!/bin/sh | 1 | #!/bin/sh |
2 | flask run | 2 | FLASK_APP=/app/src/app.py flask run -p 8000 -h "0.0.0.0" |