Trying to get more understanding of Docker

I know this is possibly a really silly question, so I will ask it anyway.

Wappler gives easy access to things like portainer, and traefik which i could install manually if I were not using Wappler, from the library of containers on https://hub.docker.com/search?q=&type=image
I also see in that library, mysql, mariadb, and redis among many others.

I assume Wappler just took these and made them easy for all of us to use without us having to really know how.

Using portainer after a docker system prune it reports
2 Stacks, 4 Containers, 6 Images, 4 Volumes, 4 Networks

The 4 containers make sense to me

  1. Web (NodeJS Application container)
  2. DB (MariaDB / MySQL Application Container)
  3. Traefik
  4. Portainer

The 4 Volumes make sense too, as most of the containers need a volume to store persistent data

  1. db-volume
  2. user_uploads
  3. letsencrypt (My SSL Certificate)
  4. portainer_data

The 6 Images also seem to be relevant to the containers and volumes above by nature

  1. mariadb-10.5
  2. portainer
  3. traefik-v2.2
  4. node-14
  5. db.latest
  6. web.latest (Judging by date created, this seems to be the created image with each deploy)

Questions:

  1. I would like to know what the 2 Stacks are. In fact what are Stacks all together?
  2. Why 4 networks, and not just one?

Larger Question
Can I install more images i may want to use in my project?
In https://hub.docker.com/search?q=&type=image&page=2 I can see things like sentry, phpmyadmin and even wordpress which I may need from time to time if my client wants to add a blogging section to a site i have already created with wappler and docker.

If I can install these images, what is the best way, with NPM, or the new homebrew integration, or could I use portainer, which seems to have a GUI in the images section?

Did you ever figure this out?

I never really got back to it, so no, not yet, funnily enough I have a situation coming up where an existing site now needs a blog added, so i would like to add a WordPress section, so I am going to have to figure this out very soon.

2 Likes

This is a very interesting topic, following it waiting someone will solve the questions!!

Stacks are just collections of containers that normally form part of the same application(as a whole). Your wappler app can have a container for Apache, another one for your database and a third one for Redis and they can be installed as a stack.
They are specially relevant if you are running docker in a swarm(orchestration).

In your case one of the stacks is created by wappler and the other one I don't know what it is. You can review them in portainer or through the command line.

You will always have 3 by default when you install docker. The other one is probably created by your Wappler app.

Yes. However if you need them to talk between each other your need to configure the docker network appropriately. There are several options available for this.

Personal preference. But I would say docker.

1 Like

Thanks @JonL that makes things a bit clearer.

So now can I ask if you can explain to me in “Dummy” terms, how you would handle this situation.

I have a site all done, it has been made through Digital Ocean and Wappler, so pretty much Wappler did it all for me, with NodeJS and a database.

The client now says, let’s add a blog on a directory of the existing site, i suggested a subdomain because then it would have been easier in my mind, but they said they want the blog rather in the same site, so like mysite.com/blog/.
I want to add a WordPress blog pointed at that directory.

Im wondering how to do it, normally I would go and create a droplet in digital ocean with WHM, cPanel, Apache, PHP, WordPress if I wanted a WordPress website, but in this case, I really have no clue where to even begin.

Any chance of a step1, do this, step2, do that, etc.

This seems overkill.

Although it really depends on the traffic the blog will receive. If it's not going to have too much traffic you could just add wordpress in the same droplet and configure the wordpress config files so the base url is https://theirdomain.com/blog

Just make sure you have fresh backups of everything before you start doing things :wink:

2 Likes