mirror of
https://github.com/Eggbertx/gochan.git
synced 2025-08-01 22:26:24 -07:00
Fix gochan sample config and fix readme
This commit is contained in:
parent
83d9bbafdf
commit
9816c0b2f0
2 changed files with 50 additions and 3 deletions
49
README.md
49
README.md
|
@ -18,7 +18,7 @@ Demo installation: https://gochan.org
|
|||
|
||||
## 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" and "postgres" (sqlite3 is no longer supported for stability reasons).
|
||||
1. To connect to a MySQL database, set `DBhost` to "tcp(ip:3306)" or a different port, if necessary.
|
||||
1. To connect to a MySQL database, set `DBhost` to "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.
|
||||
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.
|
||||
|
@ -26,10 +26,57 @@ Demo installation: https://gochan.org
|
|||
## Installation using Docker
|
||||
See [`docker/README.md`](docker/README.md)
|
||||
|
||||
## Migration
|
||||
If you run gochan and get a message telling you your database is out of data, please run gochan-migration. If this does not work, please contact the developers.
|
||||
|
||||
## 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 or postgresql
|
||||
3. After it finishes installing the Ubuntu VM, follow the printed instructions.
|
||||
|
||||
## For developers (using vscode)
|
||||
1. Install go, the vs-go extention and gcc (I think, let me know if you need something else)
|
||||
2. Install either postgreSQL or mariaDB. Setup a database with an account and enter the ip:post and login information into the gochan.json config. See "Configuration". (Tools like PG admin highly recommended for easy debugging of the database)
|
||||
3. Set "DebugMode" to true. This will log all logs to the console and disable some checks.
|
||||
4. Open the folder containing everything in vscode (named gochan most likely), go to "Run"
|
||||
1. Select "gochan" if you wish to run/debug the website itself
|
||||
2. Select "gochan-migrate" if you wish to run/debug the migrator
|
||||
5. (Optional) Change go extention configs. Examples: save all files on start debugging
|
||||
6. Press F5 or "Start Debugging" to debug.
|
||||
|
||||
# Theme development
|
||||
See [`sass/README.md`](sass/README.md) for information on working with Sass and stylesheets.
|
||||
|
||||
# Development
|
||||
|
||||
## Styleguide
|
||||
* Follow the standard go styleguide
|
||||
* All exported functions and variables should have a documentation comment explaining their functionality, as per go style guides.
|
||||
* Unexported functions are preferred to have a documentation comment explaining it, unless it is sufficiently self explanatory or simple.
|
||||
* Git commits should be descriptive. Put further explanation in the comment of the commit.
|
||||
* Function names should not be *too* long
|
||||
* Avoid single letter variables, use descriptive variables names if possible, within reason
|
||||
|
||||
## Roadmap
|
||||
|
||||
### Near future
|
||||
All features that are to be realised for the near future are found in the issues tab with the milestone "Next Release"
|
||||
|
||||
### Lower priority
|
||||
* Improve moderation tools heavily
|
||||
* Rework board creation to correctly use new fields.
|
||||
* Rework any legacy structs that uses comma separated fields to use a slice instead.
|
||||
* Replace all occurrences of “interfaceslice(items)” with []interface{}{items} notation, then remove interfaceslice.
|
||||
* Remove all references/code related to sqlite
|
||||
* RSS feeds from boards/specific threads/specific usernames+tripcodes (such as newsanon)
|
||||
* Pinning a post within a thread even if its not the OP, to prevent its deletion in a cyclical thread.
|
||||
|
||||
### Later down the line
|
||||
* Look into the possibility of a plugin system, preferably in go, a scripting language if that is not possible
|
||||
* Move frontend to its own git to allow easier frontend swapping
|
||||
* API support for existing chan browing phone apps
|
||||
* Social credit system to deal with tor/spam posters in a better way
|
||||
* Better image fingerpringing and banning system (as opposed to a hash)
|
||||
|
||||
### Possible experimental features:
|
||||
* Allow users to be mini-moderators within threads they posted themselves, to prevent spammers/derailers.
|
|
@ -10,8 +10,8 @@
|
|||
"TemplateDir": "templates",
|
||||
"LogDir": "log",
|
||||
|
||||
"DBtype": "mysql",
|
||||
"DBhost": "tcp(127.0.0.1:3306)",
|
||||
"DBtype": "mysql/postgres",
|
||||
"DBhost": "127.0.0.1:3306",
|
||||
"_comment": "gochan can use either a URL or a UNIX socket for MySQL connections",
|
||||
"DBhost_alt": "unix(/var/run/mysqld/mysqld.sock)",
|
||||
"DBname": "gochan",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue