Private as in the content is not public by default and discovery requires a human touch. Please refer to manifesto for more details.
If you want to follow the development, there is a youtube playlist with demos!
asdf install
npm install -g yarn
cd cmd/web; yarn install
go install github.com/rubenv/sql-migrate/...@latest
go install github.com/volatiletech/sqlboiler/v4@latest
go install github.com/volatiletech/sqlboiler/v4/drivers/sqlboiler-psql@latest
createuser pcom -W
use pcom
as a password therecreatedb --owner=pcom pcom_dev
echo 'SESSION_SALT=random' >> cmd/web/.env
echo 'SITE_ROOT=http://localhost:8000' >> cmd/web/.env
echo 'DATABASE_URL=postgres://pcom:pcom@localhost:5432/pcom_dev?sslmode=disable' >> cmd/web/.env
./sqlmigrate up
cd cmd/web; yarn watch
cd cmd/web; make watchexec
psql -U pcom pcom_dev
./sql-migrate new migration_name
Edit the file given by sql-migrate
./sql-migrate up
./generate.sh
flyctl apps create pcom
fly postgres create -n pcomdb
flyctl postgres attach -a pcom pcomdb
Set secrets:
flyctl secrets set SESSION_SALT=<random string>
flyctl secrets set SITE_ROOT=https://pcom.com
flyctl secrets set MJ_APIKEY_PUBLIC=<public key from mailjet>
flyctl secrets set MJ_APIKEY_PRIVATE=<private key from mailjet>
flyctl secrets set USER_MEDIA_ENDPOINT=<endpoint>
flyctl secrets set USER_MEDIA_BUCKET=<bucket>
flyctl secrets set USER_MEDIA_KEY=<key>
flyctl secrets set USER_MEDIA_REGION=<region>
flyctl secrets set USER_MEDIA_SECRET=<secret>
flyctl secrets set SENDER_ADDRESS=<address>
flyctl secrets set ADMIN_ADDRESS=<address>
flyctl secrets set STATIC_CDN=<address> # in case you want to put static resources behind the cdn
flyctl secrets set USER_MEDIA_CDN=<address> # in case you want to put user images behind the cdn
fly deploy
, make sure you can reach the app via fly certs add pcom.com
fly certs check pcom.com
a couple of times, fly certs list
should show your domain with the status ready
.cmd/web/.env
via ./env.pl > cmd/web/.env
, remove sslmode=disable
and replace domain name with localhostTab 1:
fly proxy 5433:5432 -a pcomdb
Tab 2
./run.sh
./sqlmigrate.sh up
cd cmd/web
yarn
yarn watch # in one tab
make watchexec # in another tab
App instance is running in a wrong dc:
fly scale count 0
fly scale count 1 --region ams
The project has been generated by gogo-cli and uses gogo library