Docker Installation

Installation

Docker is an open platform for developing, shipping, and running applications. Docker allows the capability to separate applications from users’ infrastructure which delivers software quickly.

Docker provides the ability to package and run an application in an isolated environment called a Container. Containers are lightweight, hold everything needed to run an application, and are capable of functioning alongside multiple containers. This is ideal for continuous integration and continuous delivery (CI/CD) workflows such as the ADMG project where we are constantly feeding NASA Earth Science metadata.

Other important Docker objects to identify are Images and Volumes. Images are read-only templates with instructions on how to create a Docker container. Usually, an image is based on another image, with some additional customization. Then, Volumes are a preferred mechanism for persisting data generated by and used by Docker containers.

https://docs.docker.com/get-docker/

Editing the .env

Next create a new file with name with .env

Inorder to use the local configuration Copy .env.sample_local to .env

Docker Build

Once docker is installed go to VS Code. If you do not already have one, open up a new terminal (Ctrl +). Cd into the correct directory which would be admg-backend and run the following code.

docker-compose -f docker-compose.local.yml up --build

Running this line of code, users should see a return of all the Docker objects being built. If you look at the Docker Desktop app you should see the following objects added.

Running the Project

Next run the following code inside the terminal

docker exc -it admg-webapp-1 bash

Running servers

The ADMG project uses three servers: Production, Test, and Play. Production runs the actual MI, Test is available for allowing the Inventory Team to test out new updates to the MI before they are deployed to Prod, and Play is for trialing new deployment methods without breaking the other two servers.

The Maintenance Interface and Django Admin for the production server can be accessed at the following url: https://admg.nasa-impact.net/