• Supercontest
      • Remember, you have to docker-compose down before running the tests on the host. Otherwise, the app will not be able to start (socket already in use).
      • Added tests for http auth and the graphql endpoint. CSRF is disabled in the python tests, so I gave a full client example in the readme.
      • Stopped using relays and connectionfields, opting instead to just use graphene’s List type. You lose some automatic pagination and other cursor capabilities, but querying becomes a lot simpler – you don’t have to specify edges and nodes every time. As it grows, switching back would be very easy.
      • Deployed to prod and closed #41 after merge. The `make deploy` convenience target works.
      • Graphiql in prod was missing the csrf token. I ensured SC_DEV worked and the csrf protection was initialized.
      • Changed the makefile recipes for ansible to use –key-file at the command line instead of requiring that ssh-agent and ssh-add be run before.
      • Added csrf_protect back to the app in dev mode, then exempted the graphql view. This is just wrapping it with the func (instead of the decorator), like login_required(csrf_protect.exempt(GraphQLView.as_view())).
      • Right now, my graphql resolvers just return everything. I don’t add nodes and fields for people to filter on certain values. I can later, but right now I just expect clients to handle it all.
      • Emailed the group with the graphiql link and the python query example.
    • docker top can be used to check processes in the container.
    • You can check the environment of an already-running process with `cat /proc/<pid>/environ`. Super useful.
    • Removed the ps1 stuff from tmux (it was exiting immediately on startup) and removed the ssh-agent stuff from .bash_profile (I explicitly call out the ssh key in my makefile calls to ansible).
    • Nginx reverse proxy.
      • Multiple websites in different containers on the same machine.
      • First create the umbrella network on the host: docker network create nginx-proxy
      • Then start the reverse proxy container which uses this network.
      • Then start the actual service containers with this network as well. These must have 3 things in their docker-compose yamls:
        • Expose port 80 on the service
        • Add the nginx-proxy network
        • Add the VIRTUAL_HOST env var for the domain.
      • There’s a companion container to handle letsencrypt as well.
        • Add a few more volumes to share certs between the containers.
        • Add the LETSENCRYPT_HOST (and _EMAIL) env vars for the domain.
      • Didn’t finish this, but will resume tomorrow.
    • Generalized my digitalocean project name and droplet name to MyProject and MyDroplet, since they host multiple services. Added the A and NS records for my second domain (bmahlstedt.com), so digitalocean’s nameservers direct to both my domains instead of godaddy. The registrar update it within like 60 seconds, much faster than last time.
      • Since I haven’t finished the reverse proxy yet, https://bmahlstedt.com points to the supercontest application lol. This makes sense, as I’m not VIRTUAL_HOST routing the traffic by domain yet.
        • This could be used easily to point multiple domains at the exact same service/site.
      • It’s also not ssl trusted and red, which makes sense since I haven’t certified this domain yet.