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/
|
||||
FROM python:3.10-slim-buster
|
||||
|
||||
WORKDIR /usr/src/
|
||||
WORKDIR /app
|
||||
|
||||
# Set timezone.
|
||||
# - 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
|
||||
ENV TZ="Europe/Berlin"
|
||||
|
||||
COPY requirements.txt ./
|
||||
COPY requirements.txt .
|
||||
RUN pip3 install --no-cache-dir -r requirements.txt
|
||||
|
||||
COPY src/ ./
|
||||
COPY src/ .
|
||||
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" ]
|
||||
CMD [ "log-verbose" ]
|
||||
|
@ -1,13 +1,11 @@
|
||||
version: '3.7'
|
||||
services:
|
||||
bbb-status:
|
||||
container_name: bbb-status
|
||||
build: .
|
||||
command: ["log-verbose"] # see main.py for available commandline arguments
|
||||
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:
|
||||
- ./secret:/usr/secret
|
||||
- ./data:/usr/data
|
||||
- ./plot:/usr/plot
|
||||
- ./secret:/secret
|
||||
- ./data:/data
|
||||
- ./plot:/plot
|
||||
|
Loading…
Reference in New Issue
Block a user