dockerize
This commit is contained in:
parent
9443fed29e
commit
5139c2d612
3 changed files with 30 additions and 1 deletions
10
Dockerfile
Normal file
10
Dockerfile
Normal file
|
@ -0,0 +1,10 @@
|
|||
FROM python:3.7-alpine
|
||||
|
||||
EXPOSE 4785
|
||||
|
||||
RUN pip3 install --no-cache-dir \
|
||||
matrix-client
|
||||
|
||||
ADD main.py /
|
||||
|
||||
CMD /main.py
|
18
docker-compose.yml
Normal file
18
docker-compose.yml
Normal file
|
@ -0,0 +1,18 @@
|
|||
version: '3'
|
||||
|
||||
networks:
|
||||
web:
|
||||
external: true
|
||||
|
||||
services:
|
||||
bot:
|
||||
build: .
|
||||
restart: unless-stopped
|
||||
env_file:
|
||||
- .env
|
||||
networks:
|
||||
- web
|
||||
labels:
|
||||
traefik.enable: "true"
|
||||
traefik.frontend.rule: "Host: ${CHATONS_SERVICE:-wwm}.${CHATONS_DOMAIN:-localhost}, www.${CHATONS_SERVICE:-wwm}.${CHATONS_DOMAIN:-localhost}"
|
||||
|
3
main.py
3
main.py
|
@ -1,4 +1,4 @@
|
|||
#!/usr/bin/env python
|
||||
#!/usr/bin/env python3
|
||||
"""
|
||||
wifi-with-matrix script.
|
||||
Bridge between https://code.ffdn.org/FFDN/wifi-with-me & a matrix room
|
||||
|
@ -62,4 +62,5 @@ class WWMBotForwarder(BaseHTTPRequestHandler):
|
|||
|
||||
|
||||
if __name__ == '__main__':
|
||||
print('Wifi-With-Matrix bridge starting…')
|
||||
WWMBotServer(SERVER_ADDRESS, WWMBotForwarder).serve_forever()
|
||||
|
|
Loading…
Reference in a new issue