Compare commits

..

9 Commits

Author SHA1 Message Date
Tulir Asokan 42d54dac5b Bump version to 0.2.0rc3 2018-05-25 00:08:46 +03:00
Tulir Asokan 767a51f994 Merge pull request #142 from jcgruenhage/master
Rework Dockerfile to remove virtualenv
2018-05-25 00:07:57 +03:00
Jan Christian Grünhage 313b5e5d07 rework Dockerfile to remove virtualenv 2018-05-24 00:59:26 +02:00
Tulir Asokan 961707dd30 Bump version to 0.2.0rc2 2018-05-21 00:39:27 +03:00
Tulir Asokan 90197f1a40 Update links in README so they work on docker hub 2018-05-21 00:39:13 +03:00
Tulir Asokan 53a7111550 Merge pull request #137 from jcgruenhage/master
fix ffmpeg in docker
2018-05-21 00:25:02 +03:00
Jan Christian Grünhage 78d1f92c13 fix ffmpeg in docker 2018-05-20 23:22:07 +02:00
Tulir Asokan 37b13fe31b Merge pull request #136 from jcgruenhage/docker
Add Dockerfile
2018-05-20 16:10:06 +03:00
Jan Christian Grünhage 39c9548983 add Dockerfile 2018-05-20 14:39:28 +02:00
6 changed files with 76 additions and 3 deletions
+30
View File
@@ -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 \
py3-pillow \
py3-aiohttp \
py3-lxml \
py3-magic \
py3-numpy \
py3-asn1crypto \
py3-sqlalchemy \
build-base \
ffmpeg \
bash \
ca-certificates \
su-exec \
s6 \
&& cd /opt/mautrixtelegram \
&& cp -r docker/root/* / \
&& rm docker -rf \
&& pip3 install -r requirements.txt -r optional-requirements.txt
VOLUME /data
CMD ["/bin/s6-svscan", "/etc/s6.d"]
+2 -2
View File
@@ -3,7 +3,7 @@ A Matrix-Telegram hybrid puppeting/relaybot bridge.
### [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
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)
## Preview
![Preview](preview.png)
![Preview](https://raw.githubusercontent.com/tulir/mautrix-telegram/master/preview.png)
+1
View File
@@ -0,0 +1 @@
#!/bin/sh
+2
View File
@@ -0,0 +1,2 @@
#!/bin/bash
s6-svscanctl -t /etc/s6.d
+40
View File
@@ -0,0 +1,40 @@
#!/bin/bash
# Define functions
function fixperms {
chown -R ${UID}:${GID} /data /opt/mautrixtelegram
}
# Go into env
cd /opt/mautrixtelegram
export FFMPEG_BINARY=/usr/bin/ffmpeg
# 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
python3 -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
fixperms
exec su-exec ${UID}:${GID} python3 -m mautrix_telegram -c /data/config.yaml
+1 -1
View File
@@ -1,2 +1,2 @@
__version__ = "0.2.0rc1"
__version__ = "0.2.0rc3"
__author__ = "Tulir Asokan <tulir@maunium.net>"