1
0
Fork 0
mirror of https://github.com/Eggbertx/gochan.git synced 2025-08-03 19:56:22 -07:00
No description
Find a file
Eggbertx 40c1f48186 Fix json tag, Printf usage, add initial gochan-migration stuff
TODO: make gochan-migration actually useful
2020-06-12 11:01:28 -07:00
.vscode vscode: Add snippet file for query & scan into slice 2020-05-03 11:46:20 +02:00
cmd Fix json tag, Printf usage, add initial gochan-migration stuff 2020-06-12 11:01:28 -07:00
devtools Add #if flag markers in sql macro script 2020-06-11 17:20:59 +02:00
docker Fixes Docker. Adds docker-compose to run a container with mariadb 2020-04-02 21:56:29 -06:00
frontend Add ES6 frontend so far 2020-06-03 15:43:35 -07:00
html re-add closeHandle to avoid trying to run Close on potentially nil pointers 2020-04-04 23:06:29 -07:00
pkg Fix json tag, Printf usage, add initial gochan-migration stuff 2020-06-12 11:01:28 -07:00
sample-configs Removed any reference to board.html 2020-05-27 20:50:49 +02:00
sass Remove old manage.js reference, fix dropdown menu color 2020-03-23 17:01:04 -07:00
sql/preapril2020migration Add normalisation step for bans 2020-06-12 15:54:14 +02:00
templates Fix catalog 2020-05-27 21:32:15 +02:00
vagrant use GOPATH in Makefile clean target 2020-05-19 17:50:33 -07:00
.deepsource.toml Add .deepsource.toml 2020-04-04 21:59:26 +00:00
.gitignore Add ES6 frontend so far 2020-06-03 15:43:35 -07:00
build.ps1 refactor/reorganize gochan's source code into subpackages 2020-04-29 17:44:29 -07:00
Database ERD.drawio Fix erd 2020-05-30 22:44:09 +02:00
Database ERD.png Fix erd 2020-05-30 22:44:09 +02:00
Database migration notes.txt merge commit 2020-06-07 16:08:24 +02:00
go.mod Properly log config issues if value isn't set and msg != "" 2020-05-09 09:26:54 -07:00
go.sum Properly log config issues if value isn't set and msg != "" 2020-05-09 09:26:54 -07:00
initdb_master.sql Named all constraints that need explicit names 2020-06-11 14:51:37 +02:00
initdb_mysql.sql Finish thread/post/file migration. 2020-06-11 20:11:46 +02:00
initdb_postgres.sql Finish thread/post/file migration. 2020-06-11 20:11:46 +02:00
LICENSE Use v1 base64captcha API 2020-02-07 21:46:30 -08:00
Makefile Fix json tag, Printf usage, add initial gochan-migration stuff 2020-06-12 11:01:28 -07:00
README.md re-add closeHandle to avoid trying to run Close on potentially nil pointers 2020-04-04 23:06:29 -07:00
refactorgcfs.sh refactor/reorganize gochan's source code into subpackages 2020-04-29 17:44:29 -07:00
version re-add closeHandle to avoid trying to run Close on potentially nil pointers 2020-04-04 23:06:29 -07:00

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

Installation

Basic installation (from a release)

  1. Extract the .tar.gz or the .zip file into a directory (for example, your home directory)
  2. 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.
  3. 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.
  4. 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 run systemctl start gochan.service to start it as a background service.
    1. If you aren't using a distro with systemd, you can start a screen session and run /path/to/gochan
  5. 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

  1. Make sure to set DBtype, DBhost, DBname, DBusername, and DBpassword, since these are required to connect to your SQL database. Valid DBtype values are "mysql", "postgres", and "sqlite3".
    1. To connect to a MySQL database, set DBhost to "tcp(ip:3306)" or a different port, if necessary.
    2. 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.
    3. 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.
  2. Set DomainRegex,SiteDomain, since these are necessary in order to post and log in as a staff member.
  3. If you want to see debugging info/noncritical warnings, set verbosity to 1.

Installation using Docker

See docker/README.md

For developers (using Vagrant)

  1. Install Vagrant and Virtualbox. Vagrant lets you create a virtual machine and run a custom setup/installation script to make installation easier and faster.
  2. 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, run GC_DBTYPE=dbtype vagrant up, replacing "dbtype" with either mysql, postgresql, or sqlite3.
  3. After it finishes installing the Ubuntu VM, follow the printed instructions.

Theme development

See sass/README.md for information on working with Sass and stylesheets.