-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathBastillefile
49 lines (31 loc) · 1.44 KB
/
Bastillefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
CONFIG set sysvshm=new
CONFIG set sysvmsg=new
RESTART
ARG EMAIL
ARG DOMAIN
ARG PASSWORD
PKG acme.sh nginx postgresql13-server net-im/py-matrix-synapse
CMD acme.sh --register-account -m ${EMAIL} --server letsencrypt
CMD acme.sh --issue --standalone -d ${DOMAIN} --listen-v4
#CMD acme.sh --issue --standalone -d ${DOMAIN} --listen-v6
SYSRC nginx_enable="YES"
SYSRC postgresql_enable=YES
SYSRC synapse_enable=YES
SYSRC synapse_user=synapse
SYSRC synapse_logdir=/var/log/matrix-synapse
SYSRC synapse_pidfile=/var/run/matrix-synapse/homeserver.pid
CMD /usr/local/etc/rc.d/postgresql initdb
SERVICE postgresql start
CMD (psql -a -U postgres -c "CREATE ROLE synapse_user WITH LOGIN PASSWORD '${PASSWORD}';")
CMD (psql -a -U postgres -c "CREATE DATABASE synapse OWNER=synapse_user;")
CMD (/usr/local/bin/python3.8 -B -m synapse.app.homeserver -c /usr/local/etc/matrix-synapse/homeserver.yaml --generate-config -H ${DOMAIN} --report-stats no)
CMD install -d -o synapse -g wheel /var/spool/matrix-synapse/media_store
CP usr /
RENDER /usr/local/etc/nginx/nginx.conf
CP root /
RENDER /root/patch/patch-homeserver.yaml
CMD patch /usr/local/etc/matrix-synapse/homeserver.yaml < /root/patch/patch-homeserver.yaml
CMD patch /usr/local/etc/matrix-synapse/${DOMAIN}.log.config < /root/patch/patch-log.config
CMD echo '0 0 * * * root acme.sh --cron --home "/root/.acme.sh" > /dev/null' >> /etc/crontab
SERVICE nginx start
SERVICE synapse start