Quick Notes on Exploring Other Apps, Session 4

This post was originally published on Lauren’s Sandbox and covers quick notes from session 1 of Reclaim EdTech‘s July Flex Course on Understanding Containers.

This session was fun because I was able to finally attend live– hadn’t been able to do so earlier this month due to vacation & other meetings! I still have to catch up on Session 3, but it was cool to be able to follow along and explore other Docker apps in this final session. Here are my quick notes:

Quick Links:

HedgeDoc

We started first by spinning up three new docker containers to explore HedgeDocBaserow, and WBO. As shown in previous sessions, we used a docker-compose.yml file found in the developer’s instructions to get up and running.

HedgeDoc was fairly straight forward after making the following changes to the docker-compose file:

version: '3'
services:
  database:
    image: postgres:13.4-alpine
    environment:
      - POSTGRES_USER=hedgedoc
      - POSTGRES_PASSWORD=addyourpassword
      - POSTGRES_DB=hedgedoc
    volumes:
      - database:/var/lib/postgresql/data
    restart: always
  app:
    # Make sure to use the latest release from https://hedgedoc.org/latest-release
    image: quay.io/hedgedoc/hedgedoc:1.9.4
    environment:
      - CMD_DB_URL=postgres://hedgedoc:addyourpassword@database:5432/hedgedoc
      - CMD_DOMAIN=laurens-hedgedoc.wc.reclaim.cloud
      - CMD_URL_ADDPORT=false
    volumes:
      - uploads:/hedgedoc/public/uploads
    ports:
      - "80:3000"
    restart: always
    depends_on:
      - database
volumes:
  database:
  uploads:
  • Setting a new password for lines 7 & 16
  • Adding your environment URL to line 17
  • Changing CMD_URL_ADDPORT to false on line 18
  • Updating the port to 80 on line 22

Once saving that docker-compose.yml file in a root>hedgedoc directory, you can pull the changes and rerun the containter. Really anytime you’re making updates to a container, you can stop it (docker-compose down), pull changes (docker-compose pull) and then rerun the container (docker-compose up -d).

Apparently you don’t have to use this order but I will because that makes sense in my head. :)

At the time of this writing, my test instance of HedgeDoc now lives happily at https://laurens-hedgedoc.wc.reclaim.cloud/. In order to get this loading over HTTPS, I added a quick load balancer to the environment and that did the trick!

Baserow

Up next we went through the same motions but with Baserow. Here’s the docker-compose file we used with various changes:

version: "3.4"
services:
  baserow:
    container_name: baserow
    image: baserow/baserow:1.10.2
    environment:
      BASEROW_PUBLIC_URL: 'http://laurens-baserow.wc.reclaim.cloud'
    ports:
      - "80:80"
      - "443:443"
    volumes:
      - ./baserow_data:/baserow/data
volumes:
  baserow_data:
  • add your environment URL on line 7
  • change from Volume to Bind Mount on line 12

I hadn’t yet played with Bind Mounts this month beyond a basic understanding from Session 2, so this was a cool moment for me! We were able to define the path where the data for this container was stored by adding a “./” to the beginning of line 12 above. This shortcut essentially says, “store the baserow data wherever the docker-compose file lives.”

Even though this shortcut is pretty cool, there’s nothing stopping you from manually defining the directory like: /root/baserow/baserow_data:/baserow/data

After saving the the docker-compose file and running the new container, it was cool to take a peek in the directory and see that the baserow_data folder had been added:

My test instance currently lives on http://laurens-baserow.wc.reclaim.cloud/.

WBO

Lastly, we got WBO up and running by cloning from their github repository instead of manually creating a docker-compose file:

git clone https://github.com/Techbraintechnologies/wbo 

After cloning completes, remember that you’ll still have to run the container. This took a minute or two, but worked all the same!

Once that completed, I was able to test out my WBO instance on http://laurens-wbo.wc.reclaim.cloud/.

The repetition in this session has allowed time for extra practice & exposure to different kinds of docker-compose files, which I really appreciate. Each docker container can be a bit unique so I’ve really enjoyed getting to play around with different examples this week.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Back to Top