I finally created a website for myself. This has been something I’ve wanted to do for years, but I never got around to it because I’m always working on some other thing that I never actually end up completing.
I decided to rent a server DigitalOcean on Jan 1st so I can get started. It wasn’t really meant to be a New Years thing, but I did decide to start it on 1/1/2020 so I guess it was a New Years thing. I didn’t know what I wanted to do with it at the time, but I started off thinking about whether I wanted to go with Rust or Go for whatever I installed or wrote on it. It wasn’t that hard of a choice though considering one of the goals of Go is supposed to be efficiency on the server. And I’m paying for the server.
I knew I would need a database and an efficient way to serve images so the next step was to figure out whether to install these things or look into what else DigitalOcean had to offer. But I already knew I didn’t want to configure and maintain a database instance myself, so I rented a Postgres server from them too.
With that done, I started writing the web server.
But… I don’t really want to use Github anymore. And now I have my own server. So I looked into something I could self host and came across Gitea. I installed it and set it up at https://gitea.dwayne.xyz and then spent most of the month writing Go code.
Next I had to figure out how I wanted to manage versioning, database migrations, and deploying code to the server. Usually I’m planning these things in the context of a larger project and/or team, so it was nice to be able to plan for just a single developer. For deployment, I thought about using git inside the project directory on the server so I can checkout a tag, build, and install, but I thought that would be awkward since the Gitea repo for the project is on the same server, and I didn’t know how I wanted to handle authentication. I eventually settled on adding a makefile target for deployment that uses rsync for the files I need to deploy.
This was a really good project for the month of January. I learned a lot, spent a lot of time frustrated and talking to myself, and felt good about the stuff I got working. The next thing I’ll look into is installing more self hosted apps on here.