A microblog for lists.
- website
- irc #pico.sh
- mailing list
- ticket tracker
- golang
v1.18
You'll also need some environment variables
export POSTGRES_PASSWORD="secret"
export DATABASE_URL="postgresql://postgres:secret@db/lists?sslmode=disable"
export LISTS_SSH_PORT=2222
export LISTS_WEB_PORT=3000
export LISTS_DOMAIN="lists.sh"
export LISTS_EMAIL="support@lists.sh"
export LISTS_PROTOCOL="http"
I just use direnv which will load my .env file.
I use docker-compose to standup a postgresql server. If you already have a
server running you can skip this step.
Copy example .env
cp .env.example .envThen run docker compose.
docker-compose up -dThen create the database and migrate
make create
make migratemake buildThere are two apps: an ssh and web server.
./build/sshDefault port for ssh server is 2222.
./build/webDefault port for web server is 3000.
Since we use subdomains for blogs, you'll need to update your /etc/hosts file
to accommodate.
# /etc/hosts
127.0.0.1 lists.test
127.0.0.1 erock.lists.testWildcards are not support in /etc/hosts so you'll have to add a subdomain for
each blog in development. For this example you'll also want to change the domain
env var to LISTS_DOMAIN=lists.test.
I use docker-compose for deployment. First you need .env.prod.
cp .env.example .env.prodThe production.yml file in this repo uses my docker hub images for deployment.
docker-compose -f production.yml up -dIf you want to deploy using your own domain then you'll need to edit the
Caddyfile with your domain.