1
0
Fork 0
mirror of https://github.com/Eggbertx/gochan.git synced 2025-08-26 14:46:24 -07:00

Remove incomplete SyncForMac Docker stuff, start splitting docker-compose into 4 files (mariadb, mysql, postgresql, sqlite)

This commit is contained in:
Eggbertx 2024-10-27 23:21:44 -07:00
parent e7ddcf1418
commit 02e8be97cc
13 changed files with 229 additions and 257 deletions

View file

@ -2,31 +2,6 @@
set -euo pipefail
if [ ! -f /etc/gochan/.installed ]; then
sed -i "/etc/gochan/gochan.json" \
-e "s/\"Port\": 8080/\"Port\": 9000/" \
-e "s/\"UseFastCGI\": false/\"UseFastCGI\": true/" \
-e "s/\"Username\": \".*\",//" \
-e "s#\"DocumentRoot\": \"html\"#\"DocumentRoot\": \"/srv/gochan\"#" \
-e "s#\"TemplateDir\": \"templates\"#\"TemplateDir\": \"/usr/share/gochan/templates\"#" \
-e "s#\"LogDir\": \"log\"#\"LogDir\": \"/var/log/gochan\"#" \
-e "s/\"Verbosity\": 0/\"Verbosity\": 1/" \
-e "s/\"DBtype\".*/\"DBtype\": \"${DBTYPE}\",/" \
-e "s/\"DBhost\".*/\"DBhost\": \"tcp(${DATABASE_HOST}:${DATABASE_PORT})\",/" \
-e "s/\"DBname\".*/\"DBname\": \"${DATABASE_NAME}\",/" \
-e "s/\"DBusername\".*/\"DBusername\": \"${DATABASE_USER}\",/" \
-e "s/\"DBpassword\".*/\"DBpassword\": \"${DATABASE_PASSWORD}\",/"
echo "Finished first-time Gochan configuration"
git config --global --add safe.directory /opt/gochan
./build.py
./build.py install
touch /etc/gochan/.installed
fi
nginx
echo "pinging db, DBTYPE: '$DBTYPE'"
/opt/gochan/docker/wait-for.sh "$DATABASE_HOST:$DATABASE_PORT" -t 30
/opt/gochan/gochan -rebuild all
/opt/gochan/gochan