added docker build file
This commit is contained in:
parent
de9107db5f
commit
b72bdeffd3
2
.gitignore
vendored
2
.gitignore
vendored
@ -1,5 +1,5 @@
|
||||
*.toml
|
||||
|
||||
*docker_test*
|
||||
# ---> Python
|
||||
# Byte-compiled / optimized / DLL files
|
||||
__pycache__/
|
||||
|
6
Dockerfile
Normal file
6
Dockerfile
Normal file
@ -0,0 +1,6 @@
|
||||
FROM python:alpine3.18
|
||||
WORKDIR /
|
||||
COPY apprise-client.py opt
|
||||
ENV toml_path=''
|
||||
RUN pip install requests
|
||||
CMD [ "python", "opt/apprise-client.py" ]
|
@ -1,7 +1,12 @@
|
||||
import requests as r
|
||||
from tomllib import load
|
||||
import os
|
||||
|
||||
if os.environ["toml_path"]:
|
||||
config_file_path=os.environ["toml_path"]
|
||||
else:
|
||||
config_file_path = './config.toml'
|
||||
|
||||
config_file_path = './config.toml'
|
||||
with open(config_file_path, 'rb') as c:
|
||||
config = load(c)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user