Initial commit
This commit is contained in:
18
Dockerfile
Normal file
18
Dockerfile
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
FROM docker.io/library/node:bookworm-slim
|
||||||
|
|
||||||
|
RUN apt update && apt install git -y
|
||||||
|
|
||||||
|
RUN mkdir -p /root/ooye/
|
||||||
|
|
||||||
|
RUN git clone https://gitdab.com/cadence/out-of-your-element.git /root/ooye/
|
||||||
|
#RUN cd /root/ooye/ && git checkout v2.3
|
||||||
|
|
||||||
|
#COPY ./out-of-your-element/ /root/ooye/
|
||||||
|
|
||||||
|
RUN apt remove git -y && apt autoremove -y
|
||||||
|
|
||||||
|
COPY ./start.sh /root/ooye/start.sh
|
||||||
|
|
||||||
|
RUN chmod +x /root/ooye/start.sh
|
||||||
|
|
||||||
|
ENTRYPOINT ["/root/ooye/start.sh"]
|
||||||
28
docker-compose.yml
Normal file
28
docker-compose.yml
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
services:
|
||||||
|
matrix:
|
||||||
|
# command:
|
||||||
|
# - migrate_config
|
||||||
|
image: matrixdotorg/synapse
|
||||||
|
ports:
|
||||||
|
- "5070:8008/tcp"
|
||||||
|
environment:
|
||||||
|
SYNAPSE_SERVER_NAME: a.website.com
|
||||||
|
SYNAPSE_REPORT_STATS: no
|
||||||
|
SYNAPSE_HTTP_PORT: 8008
|
||||||
|
restart: unless-stopped
|
||||||
|
volumes:
|
||||||
|
- ./data:/data
|
||||||
|
ooye:
|
||||||
|
container_name: ooye
|
||||||
|
build:
|
||||||
|
dockerfile: "./Dockerfile"
|
||||||
|
ports:
|
||||||
|
- 6693:6693
|
||||||
|
volumes:
|
||||||
|
- ./data-ooye:/data
|
||||||
|
- ./data:/matrix
|
||||||
|
depends_on:
|
||||||
|
matrix:
|
||||||
|
condition: service_healthy
|
||||||
|
restart: true
|
||||||
|
restart: unless-stopped
|
||||||
32
start.sh
Normal file
32
start.sh
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
set -e
|
||||||
|
directory="${DIRECTORY:-/data/}"
|
||||||
|
|
||||||
|
cd /root/ooye/
|
||||||
|
|
||||||
|
export OOYE_DOCKER=1
|
||||||
|
|
||||||
|
npm i
|
||||||
|
|
||||||
|
cd $directory
|
||||||
|
|
||||||
|
if [ ! -d ./docs ]; then
|
||||||
|
cp -r /root/ooye/docs/ ./
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
if [ ! -f ooye.db ] && [ -f /data/registration.yaml ] && [ -d /matrix ]; then
|
||||||
|
cp /data/registration.yaml /matrix/registration.yaml
|
||||||
|
if [ ! $(grep -q "app_service_config_files" /matrix/homeserver.yaml) ]; then
|
||||||
|
echo "app_service_config_files:" >> /matrix/homeserver.yaml
|
||||||
|
echo " - \"/data/registration.yaml\"" >> /matrix/homeserver.yaml
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -f ooye.db ] && [ -f /data/registration.yaml ]; then
|
||||||
|
node /root/ooye/addbot.js
|
||||||
|
else
|
||||||
|
echo "Detected incomplete out-of-your-element registration. Please run \`docker exec -it ooye su\` to open a shell, then run \`cd $directory && OOYE_DOCKER=1 node /root/ooye/scripts/seed.js\`. Then, restart your docker container."
|
||||||
|
fi
|
||||||
|
|
||||||
|
node /root/ooye/start.js
|
||||||
Reference in New Issue
Block a user