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:
parent
fa8adb98ed
commit
41ecd3faba
4 changed files with 10 additions and 11 deletions
|
@ -1,8 +1,8 @@
|
||||||
# gochan configuration
|
# 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
|
## 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.
|
* `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.
|
* `TemplateDir` refers to the directory where gochan will load the templates from.
|
||||||
* `LogDir` refers to the directory where gochan will write the logs to.
|
* `LogDir` refers to the directory where gochan will write the logs to.
|
||||||
|
|
|
@ -27,7 +27,7 @@ echo "Extracting $RELEASE_GZ"
|
||||||
tar -xf gochan-v2.12.0_linux.tar.gz
|
tar -xf gochan-v2.12.0_linux.tar.gz
|
||||||
cd $RELEASE_DIR
|
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"
|
echo "Modifying $PWD/gochan.json for testing migration"
|
||||||
sed -i gochan.json \
|
sed -i gochan.json \
|
||||||
-e 's/"Port": .*/"Port": 9000,/' \
|
-e 's/"Port": .*/"Port": 9000,/' \
|
||||||
|
|
|
@ -6,8 +6,8 @@ RUN ["./build-image.sh"]
|
||||||
|
|
||||||
WORKDIR /opt/gochan
|
WORKDIR /opt/gochan
|
||||||
|
|
||||||
COPY sample-configs/gochan-fastcgi.nginx /etc/nginx/http.d/gochan.conf
|
COPY examples/configs/gochan-fastcgi.nginx /etc/nginx/http.d/gochan.conf
|
||||||
COPY sample-configs/gochan.example.json /etc/gochan/gochan.json
|
COPY examples/configs/gochan.example.json /etc/gochan/gochan.json
|
||||||
|
|
||||||
# Get all
|
# Get all
|
||||||
COPY . .
|
COPY . .
|
||||||
|
|
|
@ -6,8 +6,7 @@ export DEBIAN_FRONTEND=noninteractive
|
||||||
export GO_VERSION=1.20
|
export GO_VERSION=1.20
|
||||||
|
|
||||||
if [ -z "$DBTYPE" ]; then
|
if [ -z "$DBTYPE" ]; then
|
||||||
echo "DBTYPE environment variable not set, must be 'mysql' or 'postgresql'."
|
echo "DBTYPE environment variable not set, must be 'mysql', 'postgresql', or 'sqlite3'"
|
||||||
echo "sqlite3 support has been dropped but it may come back eventually."
|
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
echo "Using DBTYPE $DBTYPE"
|
echo "Using DBTYPE $DBTYPE"
|
||||||
|
@ -40,7 +39,7 @@ if [ "$DBTYPE" == "mysql" ]; then
|
||||||
fi
|
fi
|
||||||
wait
|
wait
|
||||||
if [ -d /lib/systemd ]; then
|
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 daemon-reload
|
||||||
systemctl enable gochan.service
|
systemctl enable gochan.service
|
||||||
fi
|
fi
|
||||||
|
@ -62,7 +61,7 @@ elif [ "$DBTYPE" == "postgresql" ]; then
|
||||||
systemctl start postgresql &
|
systemctl start postgresql &
|
||||||
wait
|
wait
|
||||||
if [ -d /lib/systemd ]; then
|
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 daemon-reload
|
||||||
systemctl enable gochan.service
|
systemctl enable gochan.service
|
||||||
fi
|
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/
|
ln -sf /usr/lib/go-${GO_VERSION}/bin/* /usr/local/bin/
|
||||||
|
|
||||||
rm -f /etc/nginx/sites-enabled/* /etc/nginx/sites-available/*
|
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/
|
ln -sf /etc/nginx/sites-available/gochan.nginx /etc/nginx/sites-enabled/
|
||||||
|
|
||||||
# VirtualBox shared folders don't play nicely with sendfile.
|
# VirtualBox shared folders don't play nicely with sendfile.
|
||||||
|
@ -105,7 +104,7 @@ systemctl restart nginx &
|
||||||
wait
|
wait
|
||||||
|
|
||||||
mkdir -p /etc/gochan
|
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 \
|
sed -i /etc/gochan/gochan.json \
|
||||||
-e 's/"Port": 8080/"Port": 9000/' \
|
-e 's/"Port": 8080/"Port": 9000/' \
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue