Update WriteFreely server instance
Today WriteFreely v.0.10 was released with two little commits by me: Lithuanian translation and lessc installation fix for CentOS – so proud to be listed among contributors 😊 To celebrate it I'm posting quick guide how to update WriteFreely instance when building binary from source.
As always, use
mysqldump to backup your database and preferably entire home directory of user running WriteFreely.
2. Stop system service
systemctl stop writefreely
At this point Nginx will start returning
Bad gateway error to visitors.
3. Pull sources
Because I use my forked repository, I retrieve sources by using this command:
go get -d -u -v code.gyt.is/writefreely
Updated sources will be available in your user's home
GOPATH, run below command to know:
In my case it is
After sources are retrieved change directory to
Don't forget to ensure Go modules are enabled otherwise build will fail on sitemap.go as described in issue #93. So before building run:
And initiate build process:
make build # Compile the application
5. Run database migration
Might not be always necessary (check release notes) but better run database migration:
6. Initiate installation
7. Build interface
To build templates and CSS, run:
make ui # Generates CSS (run this whenever you update your styles)
Note – lessc runs fine with CentOS starting v.0.10 (my pull request there 😊).
8. Run binary
Run binary with”
This will copy
writefreely binary to to your
9. Start system service
systemctl start writefreely
Note – it's always a good idea to ensure your WriteFreely service runs on dedicated system user.
Happy lightweight federated blogging 😎