Containerizing the Login Server

Containerizing the Login Server

It came at great personal cost, but I did manage to get it done last night. Though you can't see all the work up to now as the database for this log was part of that cost.

Logged in.

With that done I can start planning the Apartment server and constructing the models for the Slime, Tank, Apartment and Characters. Though I should probably re-deploy my Dev-ops containers for managing the models first, you know, since...

Smells like I done fucked up.

At any rate, here's the bastard running in it's damnable container...

It only cost me... everything.

Really though, losing all that data was frustrating and cost me today. I was going to be modelling some stuff in the database but NOOOOO I have to deal with cataclysmic stupidity and dig through volumes and figure out what is what in order to restore my server to it's former self.

Boy, I really buggered the old brown dog on that one.

If I learned anything from this experience it's never do anything the easy way. You pay for it long term... or 3 seconds later when you watch as all your containers are deleting one by one and there's nothing you can do to stop it. Fan-dabby-fucking-dooby.  

Welp... back to fixing my shit.

Addendum;

I've mostly got everything restored, though there are three databases that have just... vanished into the aether.

Once I got done with my container necromancy I went about writing out the broad plan for the Networking II part of Gerucrash. I've also written a Dockerfile and a docker-compose.yml that should be able to run all my servers and make it easier to quickly do a git pull and restart whenever I need to do any modifications.

I'll put the Dockerfile here because HOLY SHIT was it a right bastard to get working. Nowhere near as straight-forward as you would expect. I thought "Just put the server executable in the folder, then run it. Easy." Nope. Among the lost posts is yesterday's post which was mostly me just yelling at containers and smashing my head against brick walls.

For those that want to run a docker container for their Godot server projects, a starting point:

FROM alpine:latest 


RUN apk update
RUN apk add --no-cache bash wget git
RUN wget https://github.com/sgerrand/alpine-pkg-glibc/releases/download/2.31-r0/glibc-2.31-r0.apk
RUN apk add --allow-untrusted glibc-2.31-r0.apk


COPY . /loginserv
WORKDIR /loginserv
RUN chmod +X startlogin

CMD ["./startlogin"]

EXPOSE 13975
Dockerfile
version: '3.1'

services:
  gerucrash-login-server:
    image: gerucrash-login
    build: .
    volumes:
      - '.:/gerucrash'
    ports:
      - "13975:13975/tcp"
      - "13975:13975/udp"
docker-compose.yml

Hopefully it helps some poor bastard. It's based on some thing I found that ended up being way over-engineered so I took out the bits I didn't need and wrote a docker-compose.yml to mount a volume so I could mount the directory from my server on my laptop and work on it, then only have to restart the container when I make changes... but that's just my strange way of dealing with it.

Ah, this just in; I forgot to add a UDP port for it. Gonna update that.

There, fixed it. Alright, now that I have the infrastructure and Dev-ops back in place I can come back Monday with my focus trained on designing and building these models.

Clocking out... well, after I add this image to my registry...

and NOW I can bugger off.