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

Update changed example configuration file paths

This commit is contained in:
Eggbertx 2023-12-05 11:44:56 -08:00
parent fa8adb98ed
commit 41ecd3faba
4 changed files with 10 additions and 11 deletions

View file

@ -1,8 +1,8 @@
# gochan configuration
See [gochan.example.json](sample-configs/gochan.example.json) for an example gochan.json.
See [gochan.example.json](examples/configs/gochan.example.json) for an example gochan.json.
## Server-critical stuff
* You'll need to edit some of the values (like `ListenIP` and `UseFastCGI` based on your system's setup. For an example nginx configuration, see [gochan-fastcgi.nginx](sample-configs/gochan-fastcgi.nginx) for FastCGI and [gochan-http.nginx](sample-configs/gochan-http.nginx) for passing through HTTP.
* You'll need to edit some of the values like `ListenIP` and `UseFastCGI` based on your system's setup. For an example nginx configuration, see [gochan-fastcgi.nginx](examples/configs/gochan-fastcgi.nginx) for FastCGI and [gochan-http.nginx](examples/configs/gochan-http.nginx) for passing through HTTP.
* `DocumentRoot` refers to the root directory on your filesystem where gochan will look for requested files.
* `TemplateDir` refers to the directory where gochan will load the templates from.
* `LogDir` refers to the directory where gochan will write the logs to.

View file

@ -27,7 +27,7 @@ echo "Extracting $RELEASE_GZ"
tar -xf gochan-v2.12.0_linux.tar.gz
cd $RELEASE_DIR
cp sample-configs/gochan.example.json gochan.json
cp examples/configs/gochan.example.json gochan.json
echo "Modifying $PWD/gochan.json for testing migration"
sed -i gochan.json \
-e 's/"Port": .*/"Port": 9000,/' \

View file

@ -6,8 +6,8 @@ RUN ["./build-image.sh"]
WORKDIR /opt/gochan
COPY sample-configs/gochan-fastcgi.nginx /etc/nginx/http.d/gochan.conf
COPY sample-configs/gochan.example.json /etc/gochan/gochan.json
COPY examples/configs/gochan-fastcgi.nginx /etc/nginx/http.d/gochan.conf
COPY examples/configs/gochan.example.json /etc/gochan/gochan.json
# Get all
COPY . .

View file

@ -6,8 +6,7 @@ export DEBIAN_FRONTEND=noninteractive
export GO_VERSION=1.20
if [ -z "$DBTYPE" ]; then
echo "DBTYPE environment variable not set, must be 'mysql' or 'postgresql'."
echo "sqlite3 support has been dropped but it may come back eventually."
echo "DBTYPE environment variable not set, must be 'mysql', 'postgresql', or 'sqlite3'"
exit 1
fi
echo "Using DBTYPE $DBTYPE"
@ -40,7 +39,7 @@ if [ "$DBTYPE" == "mysql" ]; then
fi
wait
if [ -d /lib/systemd ]; then
cp /vagrant/sample-configs/gochan-mysql.service /lib/systemd/system/gochan.service
cp /vagrant/examples/configs/gochan-mysql.service /lib/systemd/system/gochan.service
systemctl daemon-reload
systemctl enable gochan.service
fi
@ -62,7 +61,7 @@ elif [ "$DBTYPE" == "postgresql" ]; then
systemctl start postgresql &
wait
if [ -d /lib/systemd ]; then
cp /vagrant/sample-configs/gochan-postgresql.service /lib/systemd/system/gochan.service
cp /vagrant/examples/configs/gochan-postgresql.service /lib/systemd/system/gochan.service
systemctl daemon-reload
systemctl enable gochan.service
fi
@ -82,7 +81,7 @@ apt-get -y install git subversion mercurial nginx ffmpeg golang-${GO_VERSION}
ln -sf /usr/lib/go-${GO_VERSION}/bin/* /usr/local/bin/
rm -f /etc/nginx/sites-enabled/* /etc/nginx/sites-available/*
ln -sf /vagrant/sample-configs/gochan-fastcgi.nginx /etc/nginx/sites-available/gochan.nginx
ln -sf /vagrant/examples/configs/gochan-fastcgi.nginx /etc/nginx/sites-available/gochan.nginx
ln -sf /etc/nginx/sites-available/gochan.nginx /etc/nginx/sites-enabled/
# VirtualBox shared folders don't play nicely with sendfile.
@ -105,7 +104,7 @@ systemctl restart nginx &
wait
mkdir -p /etc/gochan
cp /vagrant/sample-configs/gochan.example.json /etc/gochan/gochan.json
cp /vagrant/examples/configs/gochan.example.json /etc/gochan/gochan.json
sed -i /etc/gochan/gochan.json \
-e 's/"Port": 8080/"Port": 9000/' \