Ubuntu 18. on Digital Ocean

This is a Server Operating System

and you are raised by wolves talking about nano. Fine you like nano, sorry to hear it.

You need to create users with permissions – who can log into your server by default? Anyone with the ip? nice. Digital Ocean will ask you to change your password, the password for root. And you can try ssh keys, if you select not to use ssh, however, you cant switch. to do

YAGNI = De Rigueur

Install docker. Who’lda thunk it, web dev recherchĂ©. Docker Container is to VirtualMachine as trailer is to house. This sort of dev setup with web server and db server and of course the infamous graphQl server, used to be packged up inside Visual Studio, but that was when the web was young, now there’s docker and you have to use nano. Now you will be installing software in containers on your ubuntu operating system using docker. These containers with specific software images are listed in an online docker repository. You request these images, and then install them.
There’s a ready-made image for all your favorite server software.

Are you thinking about why you might actually want to use docker, or what its good for? Besides setting up a bunch of remote servers, to run your web apps on, you can install your apps and set up ci, to test them, and you can save the whole thing as a docker image to install somewhere else.

First Install the Database

This is going to be mongo and maybe neo4j. Please pay me. If you want to connect to this database, from outside your ubuntu – from out in the real world, you need to run the container in the background – using the -d switch. I wanted to use a gui to create users and view the mongodb, as mentioned, Im not into nano. There is now the free https://robomongo.org/

and you want to know what the latest version of mongo is, 4.2 2/14/2020. https://www.thepolyglotdeveloper.com/2019/01/getting-started-mongodb-docker-container-deployment/

so now at the command line you are going to get the container image for mongo 4.2 docker pull mongo:4.2 to run that container – and whats not the same as if it was a virtual machine, also to run the mongo db server instance, you use the docker run command – I think I’ve stumbled here on the fact that there is a configuration file for the container, that starts up the mongo db, when you start the container. The command to start the container is docker run -d -p 27017-27019:27017-27019 –name memorableContainerName mongo:4.2

So far this works. And you can connect remotely thanks to -d command line option.

Secure the Database

This is where it all falls apart. You create a user and give them admin permissions. And maybe another user who can just read write in a single database, but you are running mongo configured to use no form of authentication. According to the documentation, you have to stop the server, set authentication to enabled, and restart it. With the way stoping and starting the container is tied to stoping and starting the dbserver, Im not able to do this. Trying to find the easiest way. Looks like theres docker compose, where you can specify the config file, like a script with start up params for a container. And this is also how you “compose” multiple containers. to be continued…

and the folder called data

you know THE folder called data. The one and only data, Data. This is the part about the trailers sharing the outhouse or something like that. So the containers can share ( memory?) with the host operating system. This partially worked, so I did without it. data is only on the container for now… to do