So after several days working with the Support folks at Digital Ocean they finally nailed down why my deploys were never getting new code and I am still not clear on the reason it was an issue to begin with but I figured it needs to be documented to maybe save someone else the trouble.
My code is a mix of Python (and some HTML/JS) using Flask, Python version in this specific situation was 3.8.2 (at least locally anyway). Using the Digital Ocean App platform and a domain hosted through them as well (hockey-info.online). Docker version locally was 20.10.2, build 2291f61 on a Fedora 32 based system.
No code changes I made after Jan 15th seemed to be pulled when doing a deploy, deploys would trigger properly however they never got the correct code just the correct commit sum. I tried manual deploys, I tried automatic, I searched the internet high, low and inbetween but couldn’t figure it out.
I finally broke down and opened a ticket with DO on a Wednesday, after going back and forth with their support people and trying a lot of things they finally informed me of a solution on the Tuesday after. It seems that in the Dockerfile I was doing a RUN git clone https://gitlab.com/dword4/hockey-info.git . which was running the git command to pull code down outside of the methods used by the App platform. The fix turns out was as simple as replacing that line with COPY . /hockey-info and then pushing the code up.
Still not entirely sure why this functions this way, there appears to be some kind of git caching going on but I have no real insight as to why, probably due to how the app platform is built.
Finally got around to a rather large update for this project, fixed some small bugs such as the L10 data being way wrong (was showing win-loss-ot for the entire seaseon) as well as added in missing stats for Goalies and made the display of previous game results more sensible. Also redid about 95% of the interface to use Bootstrap4 which has made the look more uniform throughout. If you are interested in seeing the code itself you can see that here, or if you just want to check out the live site which I host as well then you can head over to http://hockey-info.online.
So I don’t always have great cell phone service, sometimes its weak 4G or even not 4G at all so modern designed apps suffer when bandwidth is a trickle at best. I would be away from home trying to find out whats going on with a Caps game and the NHL app would just be painfully slow or not work at all sometimes. Eventually I decided the only reasonable thing a hockey nerd such as myself could do was write something to fill this void, ideally something simple and effective to get me the information I wanted without a lot of overhead and frilly extra stuff I didn’t really care about.
The repos are still in high flux right now as I don’t even have a readme file yet for the main one, however this page can serve to sort of explain the bits and pieces.
nhlapi – This is what started it all for me really, I wanted more information about games (for an IRC bot) and threw myself into pulling various bits of information together about the NHL API in an easy to read and access way so others didn’t have to spend the hours I did looking for how to do things.
hockey-info – A super simple website written in Python utilizing the Flask framework. The focus is to be fast, simple and mobile friendly. It directly queries the NHL API for all its information and is formatted in a way that works well on mobile
hockey-info-docker – A bare bones Dockerfile to deploy the latest release of hockey-info. The container is based on Alpine and is as trimmed down as possible, makes deployment super simple and easy for anybody to run their own instance with only a few commands (provided you already have a Docker host to run it on).
Naturally I make no warranty about this app or any of the code I have written, its purely something neat I built in my spare time and am tossing out there for others to enjoy, modify and extend to their hearts content. If you do happen to have input, ideas, or feedback hit me up on twitter or just open an issue on Gitlab if its a purely technical issue to address with the code.