mirror of
https://github.com/Eggbertx/gochan.git
synced 2025-08-02 19:16:23 -07:00
No description
Generate config.RandomSeed if one isn't provided in gochan.json Don't automatically fail if a board's path already exists, unless it isn't a directory Clean up SQL query strings with DBPREFIX replacer Separate the gochan.service file into separate files for each SQL DB type Enable the gochan.service in Vagrant and fix issue with it failing on restart fixes #19 |
||
---|---|---|
docker | ||
html | ||
sample-configs | ||
sass | ||
src | ||
templates | ||
vagrant | ||
.gitignore | ||
build.sh | ||
docker-compose.yml | ||
Dockerfile | ||
initdb_mysql.sql | ||
initdb_postgres.sql | ||
initdb_sqlite3.sql | ||
LICENSE | ||
README.md | ||
version |
Gochan
A semi-standalone imageboard server written in Go
Gochan works in a manner similar to Kusaba X, Tinyboard and others. As such, Gochan generates static HTML files which can optionally be served by a separate web server.
Demo installation: https://gochan.org
Note: Cross-compilation to macOS has been temporarily disabled. If you need macOS support, build gochan from a macOS system.
Installation
Basic installation (from a release)
- Extract the .tar.gz or the .zip file into a directory (for example, your home directory)
- Copy gochan.example.json to either gochan.json or (if you're in a UNIX-like OS) /etc/gochan/gochan.json and modify it as needed. See the Configuration section for more info.
- If you're using nginx, copy gochan-http.nginx, or gochan-fastcgi.nginx if
UseFastCGI
is set to true to /etc/nginx/sites-enabled/, or the appropriate folder in Windows. - If you're using a Linux distribution with systemd, you can optionally copy gochan.service to /lib/systemd/system/gochan.service and run
systemctl enable gochan.service
to have it run on startup. Then runsystemctl start gochan.service
to start it as a background service.- If you aren't using a distro with systemd, you can start a screen session and run
/path/to/gochan
- If you aren't using a distro with systemd, you can start a screen session and run
- Go to http://[gochan url]/manage?action=staff, log in (default username/password is admin/password), and create a new admin user (and any other staff users as necessary). Then delete the admin user for security.
Configuration
- Make sure to set
DBtype
,DBhost
,DBname
,DBusername
, andDBpassword
, since these are required to connect to your SQL database. ValidDBtype
values are "mysql", "postgres", and "sqlite3".- To connect to a MySQL database, set
DBhost
to "tcp(ip:3306)" or a different port, if necessary. - To connect to a PostgreSQL database, set
DBhost
to the IP address or hostname. Using a UNIX socket may work as well, but it is currently untested. - To connect to a SQLite database, set
DBhost
to the path of the database file. It will be created if it does not already exist.
- To connect to a MySQL database, set
- Set
DomainRegex
,SiteDomain
, since these are necessary in order to post and log in as a staff member. - If you want to see debugging info/noncritical warnings, set verbosity to 1.
For developers (using Vagrant)
- Install Vagrant and Virtualbox. Vagrant lets you create a virtual machine and run a custom setup/installation script to make installation easier and faster.
- From the command line, cd into vagrant/ and run
vagrant up
. By default, MySQL/MariaDB is used, but if you want to test with a different SQL type, runGC_DBTYPE=dbtype vagrant up
, replacing "dbtype" with either mysql, postgresql, or sqlite3. - After it finishes installing the Ubuntu VM, follow the printed instructions.
For developers (using Docker)
Docker support is very unstable and doesn't fully work yet.
Theme development
See sass/README.md
for information on working with Sass and stylesheets.