Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 961707dd30 | |||
| 90197f1a40 | |||
| 53a7111550 | |||
| 78d1f92c13 | |||
| 37b13fe31b | |||
| 39c9548983 |
+30
@@ -0,0 +1,30 @@
|
|||||||
|
FROM docker.io/alpine:3.7
|
||||||
|
|
||||||
|
ENV UID=1337 \
|
||||||
|
GID=1337
|
||||||
|
|
||||||
|
COPY . /opt/mautrixtelegram
|
||||||
|
RUN apk add --no-cache \
|
||||||
|
python3-dev \
|
||||||
|
py3-virtualenv \
|
||||||
|
build-base \
|
||||||
|
zlib-dev \
|
||||||
|
jpeg-dev \
|
||||||
|
libxslt-dev \
|
||||||
|
libxml2-dev \
|
||||||
|
libmagic \
|
||||||
|
ffmpeg \
|
||||||
|
bash \
|
||||||
|
ca-certificates \
|
||||||
|
su-exec \
|
||||||
|
s6 \
|
||||||
|
&& cd /opt/mautrixtelegram \
|
||||||
|
&& cp -r docker/root/* / \
|
||||||
|
&& rm docker -rf \
|
||||||
|
&& virtualenv -p /usr/bin/python3 .venv \
|
||||||
|
&& source .venv/bin/activate \
|
||||||
|
&& pip install -r requirements.txt -r optional-requirements.txt
|
||||||
|
|
||||||
|
VOLUME /data
|
||||||
|
|
||||||
|
CMD ["/bin/s6-svscan", "/etc/s6.d"]
|
||||||
@@ -3,7 +3,7 @@ A Matrix-Telegram hybrid puppeting/relaybot bridge.
|
|||||||
|
|
||||||
### [Wiki](https://github.com/tulir/mautrix-telegram/wiki)
|
### [Wiki](https://github.com/tulir/mautrix-telegram/wiki)
|
||||||
|
|
||||||
### [Features & Roadmap](ROADMAP.md)
|
### [Features & Roadmap](https://github.com/tulir/mautrix-telegram/blob/master/ROADMAP.md)
|
||||||
|
|
||||||
## Discussion
|
## Discussion
|
||||||
Matrix room: [`#telegram:maunium.net`](https://matrix.to/#/#telegram:maunium.net)
|
Matrix room: [`#telegram:maunium.net`](https://matrix.to/#/#telegram:maunium.net)
|
||||||
@@ -11,4 +11,4 @@ Matrix room: [`#telegram:maunium.net`](https://matrix.to/#/#telegram:maunium.net
|
|||||||
Telegram chat: [`mautrix_telegram`](https://t.me/mautrix_telegram) (bridged to Matrix room)
|
Telegram chat: [`mautrix_telegram`](https://t.me/mautrix_telegram) (bridged to Matrix room)
|
||||||
|
|
||||||
## Preview
|
## Preview
|
||||||

|

|
||||||
|
|||||||
Executable
+1
@@ -0,0 +1 @@
|
|||||||
|
#!/bin/sh
|
||||||
Executable
+2
@@ -0,0 +1,2 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
s6-svscanctl -t /etc/s6.d
|
||||||
Executable
+42
@@ -0,0 +1,42 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Define functions
|
||||||
|
function fixperms {
|
||||||
|
chown -R ${UID}:${GID} /data /opt/mautrixtelegram
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
# Go into env
|
||||||
|
cd /opt/mautrixtelegram
|
||||||
|
source .venv/bin/activate
|
||||||
|
|
||||||
|
# Replace database path in alembic.ini
|
||||||
|
sed -i "s#sqlite:///mautrix-telegram.db#sqlite:////data/mautrix-telegram.db#" alembic.ini
|
||||||
|
sed -i "s#sqlite:///mautrix-telegram.db#sqlite:////data/mautrix-telegram.db#" /data/config.yaml
|
||||||
|
|
||||||
|
# Check that database is in the right state
|
||||||
|
alembic upgrade head
|
||||||
|
|
||||||
|
if [[ ! -f /data/config.yaml ]]; then
|
||||||
|
cp example-config.yaml /data/config.yaml
|
||||||
|
echo "Didn't find a config file."
|
||||||
|
echo "Copied default config file to /data/config.yaml"
|
||||||
|
echo "Modify that config file to your liking."
|
||||||
|
echo "Start the container again after that to generate the registration file."
|
||||||
|
fixperms
|
||||||
|
exit
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ ! -f /data/registration.yaml ]]; then
|
||||||
|
python -m mautrix_telegram -g -c /data/config.yaml -r /data/registration.yaml
|
||||||
|
echo "Didn't find a registration file."
|
||||||
|
echo "Generated ode for you."
|
||||||
|
echo "Copy that over to synapses app service directory."
|
||||||
|
fixperms
|
||||||
|
exit
|
||||||
|
fi
|
||||||
|
|
||||||
|
export FFMPEG_BINARY=/usr/bin/ffmpeg
|
||||||
|
|
||||||
|
fixperms
|
||||||
|
exec su-exec ${UID}:${GID} python -m mautrix_telegram -c /data/config.yaml
|
||||||
@@ -1,2 +1,2 @@
|
|||||||
__version__ = "0.2.0rc1"
|
__version__ = "0.2.0rc2"
|
||||||
__author__ = "Tulir Asokan <tulir@maunium.net>"
|
__author__ = "Tulir Asokan <tulir@maunium.net>"
|
||||||
|
|||||||
Reference in New Issue
Block a user