스몰 인터넷 글쓰기 아지트 https://smol.space
Go to file
mieum 8f3890dbed add banner to manual, makefile, and scripts 2022-08-30 15:05:32 +09:00
bin add banner to manual, makefile, and scripts 2022-08-30 15:05:32 +09:00
config Add a WEB_CERT_FOLDER cfg to store the path to custom domain names certificates on web 2021-05-28 15:30:43 +02:00
gemini add banner to manual, makefile, and scripts 2022-08-30 15:05:32 +09:00
gmi2html html img & figure captions 2022-08-20 23:35:15 +09:00
gopher gopher: fix main index links, add header 2022-08-30 13:10:41 +09:00
link first commit 2021-05-22 15:07:51 +02:00
model merge upstream into main 2022-08-20 13:10:00 +09:00
rc.d add banner to manual, makefile, and scripts 2022-08-30 15:05:32 +09:00
server Merge branch 'master' of https://git.sr.ht/~m15o/smol.pub into retry 2021-08-19 22:58:38 +09:00
session first commit 2021-05-22 15:07:51 +02:00
storage Add global feed 2021-12-27 14:26:08 +01:00
template implement banner as template item 2022-08-30 13:41:53 +09:00
tests first commit 2021-05-22 15:07:51 +02:00
ui merge upstream into main 2022-08-20 13:10:00 +09:00
.gitignore update makefile, add rc and user keygen script 2022-08-29 23:32:37 +09:00
LICENSE first commit 2021-05-22 15:07:51 +02:00
Makefile add banner to manual, makefile, and scripts 2022-08-30 15:05:32 +09:00
README.md update banner on readme 2022-08-30 13:45:51 +09:00
generate.go first commit 2021-05-22 15:07:51 +02:00
go.mod first commit 2021-05-22 15:07:51 +02:00
go.sum first commit 2021-05-22 15:07:51 +02:00
main.go first commit 2021-05-22 15:07:51 +02:00
todo.txt korean translation draft 2021-08-19 21:45:06 +09:00

README.md

  ___  스몰 인터넷 글쓰기 아지트
 (o,o)  ░█▀▀░█▄█░█▀█░█░░░░░░█▀▀░█▀█░█▀█░█▀▀░█▀▀
 {'"'}  ░▀▀█░█░█░█░█░█░░░░░░▀▀█░█▀▀░█▀█░█░░░█▀▀
 -"-"-  ░▀▀▀░▀░▀░▀▀▀░▀▀▀░▀░░▀▀▀░▀░░░▀░▀░▀▀▀░▀▀▀

smol.space

smol.space is a fork of m15o's smolpub server, a low-tech journal service published on the web, gemini, and gopher. This fork translates the UI into Korean and makes a few minor adjustments and improvements to the server source code and configuration.

Deploying/Developing

Anyone wanting to deploy their own instance of smolpub will likely want to start fresh with the upstream codebase: https://git.sr.ht/~m15o/smol.pub. If for some reason you are interested in this Korean fork specifically or wish to contribute to its development, you can follow the following steps to setup your environment.

Note: smol.space runs on a FreeBSD system, so the following configuration (and the installation/maintanence scripts included in this repo) will need to be adapted to your specific needs.

Requirements

  • a local copy of this repository

  • a Go development environment

  • Postgresql 11+

  • For deployment: wildcard SSL certs, a domain, etc.

Building

Adjust the GO_BUILD_ENV in the Makefile to suit your needs, then run make build. Simple!

Installing

Again, adjust the Makefile to accommodate your needs, then run make install, and make install to reinstall/update after rebuilding smolpub each time. Installation will copy three files onto your system:

  • A copy of the smolpub binary

  • smolpub_keygen.sh: a simple script for generating registrations keys for prospective users. This script writes the generated keys to /usr/local/etc/smolpub/keys by default---adjust it if necessary.

  • rc.d/smolpub: a FreeBSD init script for starting/managing the smolpub daemon. This script expects to find a file defining the necessary environment variables at /usr/local/etc/smolpub/smolpub.conf. This file can be located anywhere, but its location must be specified here for the smolpub service to startup.

Server Environment

The smolpub server requires the following environment variables to be set. The FreeBSD startup script expects these to be defined in /usr/local/etc/smolpub/smolpub.conf.

  1. ENV="PROD"
  2. DATABASE_URL: URL through which postgresql DB is accessed
  3. HOST: Hostname of the server
  4. CERT_FILE: SSL certificate, such as fullchain.pem issued by Let's Encrypt.
  5. CERT_KEY_FILE: SSL private key, such as privkey.pem issued by Let's Encrypt.
  6. KEYS_FILE: File containing valid registration tokens, one per line.
  7. WEB_CERT_FOLDER: folder to house web certs (for custom user domains)
  8. GMI_CERT_FOLDER: folder to house gemini certificates (which smolpub automatically generates).
  9. USER_DIR: location of user data directories (for storing uploaded media).

Database Configuration

To run the smolpub server, you will need to have a Postgresql database and user setup, which can easily be achieved by doing something along the lines of:

$ su - postgres 
$ createuser -P smolpub
$ createdb -O smolpub smolpub

If you need to migrate a smolpub databse, first stop the server then dump the db by running pg_dump -a > db_dump. This dumps all the databse data but not the schema. Then before importing the dump into another instance, make sure a fresh database is created using the above commands, then initialize it by starting the smolpub server. Then importing the database is a s simple as psql smolpub < db_dump.

LICENSE

This software is licensed under a BSD 3-Clause License.