Fabrefact

a blog by Sara Farquharson

Virtual Party Space Devlog #17: Translating docker-compose files for AWS

Spent a couple days fighting with Docker and the ECS integration of docker-compose.

Log

Sunday, January 24

  • turns out can’t connect to Jitsi server when using docker compose instead of docker-compose
    • getting PR_END_OF_FILE_ERROR, so probably SSL certificates aren’t set up properly? (not even whatever self-signed one I’m using)
    • switched back to docker-compose for the purpose of playing around
  • fixed bug where leaving and rejoining the same conference would not reload the avatars for participants who had stayed in
    • addParticipant was tied to the loadImage callback, but in this case the image was already loaded
    • tried just deleting image from textureManager on participant remove, but that caused a game crash when phaser tried to render nonexistent texture
      • only happened on second time (consistently), no idea why
    • made loading of image conditional on if texture already exists, all other stuff the same
      • should player avatars ever be unloaded? If so how?
  • fixed bug where pathfinder didn’t recognize obstacles on anything but scenery layer, and treated some ground tiles as obstacles
    • possibly should simplify by consolidating most tiles onto single layer?
      • might be more complicated for other existing logic/image loading though
      • may also suggest consolidating tilesets, which is a good idea but not until i’ve finalized the map
    • Simply check for collisions in other layers, otherwise just use ground tile

Tuesday, January 26

  • UGH DOCKER
    • still can’t figure out why docker compose doesn’t like SSL
    • fine then, set up AWS credentials and context
  • trying the docker->ecs auto deploy thing
    • “published port can’t be set to a distinct value than container port: incompatible attribute”
      • can’t use custom ports for 80/443
    • “ECS Fargate does not support bind mounts from host: incompatible attribute”
      • have to learn the difference between “volumes” and “bind mounts”
      • jitsi docker-compose binds config directory for all mounts, have to figure out how to turn those into volumes
      • replaced all bind mounts with empty volumes, simply for the purpose of getting to the next error
        • possibly build config directories into docker containers rather than messing around with EFS?
    • “WARN[0001] services.networks.aliases: unsupported attribute”
      • services.networks may not be supported at all?
        • “Communication between services is implemented by SecurityGroups within the application VPC.”
    • “WARN[0001] services.restart: unsupported attribute”
      • Replaced by service.deployment.restart_policy
    • docker compose down always fails with ENV variables in ports
      • hard coded ports in docker-compose.yml
    • docker compose down doesn’t actually…do anything
      • use CloudFormation service in AWS console to delete stack
      • I WASN’T PASSING THE CONTEXT UGH this was user error
  • AWS doesn’t provide an easy way to look at every resource you created
    • have to assume cloudformation stack listed them all correctly and deleted all
  • requested ElasticIP in us-west-2 (it was very easy)
    • ****TODO: assign URL to IP so I can create a Let’s Encrypt
    • ****TODO: verify which region I want to use

notes for next attempt

  • Config bind-mounts don’t work
    • need to find alternate way to get config directories into containers
    • (I think build my own versions of the docker containers with appropriate configs?)
  • Internal domain aliases don’t work (ie xmpp.meet.jitsi)
    • need to find alternate way for services to talk to each other

About this series

Back in mid-December I started an ambitious project to create a custom platform for a virtual birthday party in February. I kept notes on my progress, both for personal reference and to turn into a series of blog posts. It quickly became apparent that I did not have time to both do the project and blog about the project. I have retroactively decided to post my raw notes as a dev log.