mirror of
https://codeberg.org/langfingaz/bbb-status
synced 2024-11-22 20:29:32 +01:00
cleaner Dockerfile
This commit is contained in:
parent
51dbeae02c
commit
3c29e49cdb
11
Dockerfile
11
Dockerfile
@ -2,7 +2,7 @@
|
|||||||
# - https://docs.docker.com/language/python/build-images/
|
# - https://docs.docker.com/language/python/build-images/
|
||||||
FROM python:3.10-slim-buster
|
FROM python:3.10-slim-buster
|
||||||
|
|
||||||
WORKDIR /usr/src/
|
WORKDIR /app
|
||||||
|
|
||||||
# Set timezone.
|
# Set timezone.
|
||||||
# - https://dev.to/0xbf/set-timezone-in-your-docker-image-d22
|
# - https://dev.to/0xbf/set-timezone-in-your-docker-image-d22
|
||||||
@ -11,11 +11,16 @@ WORKDIR /usr/src/
|
|||||||
RUN apt update && apt install tzdata -y
|
RUN apt update && apt install tzdata -y
|
||||||
ENV TZ="Europe/Berlin"
|
ENV TZ="Europe/Berlin"
|
||||||
|
|
||||||
COPY requirements.txt ./
|
COPY requirements.txt .
|
||||||
RUN pip3 install --no-cache-dir -r requirements.txt
|
RUN pip3 install --no-cache-dir -r requirements.txt
|
||||||
|
|
||||||
COPY src/ ./
|
COPY src/ .
|
||||||
RUN chmod +x langfingaz/main.py
|
RUN chmod +x langfingaz/main.py
|
||||||
|
|
||||||
|
# pythonpath is required to import from self created modules ("from langfingaz ...")
|
||||||
|
ENV PYTHONPATH=/app/
|
||||||
|
# unbuffered output, otherwise script sleeps before any output appears
|
||||||
|
ENV PYTHONUNBUFFERED=1
|
||||||
|
|
||||||
ENTRYPOINT [ "python3", "./langfingaz/main.py" ]
|
ENTRYPOINT [ "python3", "./langfingaz/main.py" ]
|
||||||
CMD [ "log-verbose" ]
|
CMD [ "log-verbose" ]
|
||||||
|
@ -1,13 +1,11 @@
|
|||||||
version: '3.7'
|
version: '3.7'
|
||||||
services:
|
services:
|
||||||
bbb-status:
|
bbb-status:
|
||||||
|
container_name: bbb-status
|
||||||
build: .
|
build: .
|
||||||
command: ["log-verbose"] # see main.py for available commandline arguments
|
command: ["log-verbose"] # see main.py for available commandline arguments
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
environment:
|
|
||||||
- PYTHONPATH=/usr/src/ # pythonpath is required to import from self created modules ("from langfingaz ...")
|
|
||||||
- PYTHONUNBUFFERED=1 # unbuffered output, otherwise script sleeps before any output appears
|
|
||||||
volumes:
|
volumes:
|
||||||
- ./secret:/usr/secret
|
- ./secret:/secret
|
||||||
- ./data:/usr/data
|
- ./data:/data
|
||||||
- ./plot:/usr/plot
|
- ./plot:/plot
|
||||||
|
Loading…
Reference in New Issue
Block a user