Post Thursday, 1st October 2020, 21:45

Docker container and TerraForm module for Webtiles

Docker
Made a Docker container for DCSS here: https://github.com/frozenfoxx/docker-crawl. The big one is the webtiles build, it's a self-contained webtiles server. Per the documentation to run it you just run:

  Code:
docker run \
  -d \
  --rm \
  -v /data/:/data \
  -p 8080:8080 \
  --name=crawl_webtiles \
  frozenfoxx/crawl:latest


It uses a bind mount for persistence and sets up port 8080 as the inbound. I had to do some digging through the Webtiles documentation and figure out how to get it rolling, there are a couple of things that weren't mentioned (it doesn't automatically create the directory tree for the rcs, I had to add some extra modules, script setup, etc) but they're all in the Dockerfile. The entrypoint script also handles directory creation in case it's not been done, just start and you're off to the races. There's also a docker-compose file if that's easier for folks.

I recommend doing SSL termination outside of this container due to the complexity involved. Personally I use traefik since it's container aware and automatically handles Let's Encrypt as well as routing.

TerraForm
I also made a TerraForm module for deploying DCSS + Traefik for SSL termination on Linode here: https://github.com/frozenfoxx/terraform-crawl-linode. Shouldn't be bad to port it to other cloud providers but that's the one I use, I'll be happy to make more repos for maintaining if there's interest in deploying on others. It sets up a VM on Linode with Docker, docker-compose, then runs a docker-compose.yaml that fires up Traefik and Crawl containers, a bind mount for persistence, and is easily-accessible via SSH key. You can easily restart the server via docker-compose just like any other docker-compose setup.

I hope you folks enjoy. I'm running it out at https://crawl.churchoffoxx.net on a tiny instance and it seems to work out just fine. I'm sorry the container's a little heavy but I tried to get it trimmed down using multistage builds.

EDIT: almost forgot, I've got this container build hooked up with GitLab CI. If there's a good testing acceptance test I could look into getting that hooked up and having this built daily. At the moment my testing is...build it and see if it works? :lol:

For this message the author frozenfoxx has received thanks:
nago