added docker build file
This commit is contained in:
parent
de9107db5f
commit
b72bdeffd3
2
.gitignore
vendored
2
.gitignore
vendored
@ -1,5 +1,5 @@
|
|||||||
*.toml
|
*.toml
|
||||||
|
*docker_test*
|
||||||
# ---> Python
|
# ---> Python
|
||||||
# Byte-compiled / optimized / DLL files
|
# Byte-compiled / optimized / DLL files
|
||||||
__pycache__/
|
__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
|
import requests as r
|
||||||
from tomllib import load
|
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:
|
with open(config_file_path, 'rb') as c:
|
||||||
config = load(c)
|
config = load(c)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user