Skip to content

NOAA-OWP/ngencerf-docker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 

Repository files navigation

ngenCERF-Docker

This project allows the user to launch the full stack for the ngenCERF web application using Docker Compose. This includes:

  • The application's frontend UI application server
  • The backend services' application server
  • A database, based on PostgreSQL

Requirements

To build and run the ngenCERF stack, you will need the following software installed and running on your system:

  • Docker Engine and Docker Compose

You will also need the following repos cloned:

The directory structure should look like this:

$ tree -L 1
.
├── data
│   ├── db
│   ├── ngen-cal-data
|   └── .ngencerf-init
├── nextgen_ui
├── ngencerf-docker
└── ngencerf-server

You will also need files with the following credentials:

  • AWS S3 credentials: saved to ngencerf-server/.aws_credentials
  • NGWPC gitlab Personal Access Token (PAT): saved to ~/.gitlab_token.

This will also create directories to persist data for:

  1. the PostgreSQL database
  2. initialization data for the ngencerf-server application.
  3. data from the ngen-cal tool

Running ngenCERF

To run the ngenCERF applicaton , execute the following command:

docker compose up

This will give you an instance of:

  • ngenCERF web application, running on your system at the address http://localhost:3000.
  • ngenCERF services, running on your system at the address http://localhost:8000
  • PostgreSQL, running on your system at localhost:5432

To shut all 3 applications down press Ctrl+C or run the command:

docker compose down

Troubleshooting

Forcing a container rebuild

If for some reason you don't see code updates being pulled into your ngencerf-server container run the following command to force a rebuild of the container:

docker compose up --build

After the rebuild is complete it will restart all the necessary services.

Forcing static data loads

By default, the first time this container is run it will perform a load of all the necessary static data into the database. When complete it will write the file ../data/.ngencerf-init/.load_static. You can delete this file to force the data to be reloaded the next time your start the application.

Executing custom commands in a running container

If there is a need to connect to a container to issue commands from a terminal, perform the following steps:

  1. Get a list of the running containers by executing the following command:
docker container ls
  1. Attach a terminal to that container:
docker exec -it <container_id> bash
  1. Execute any needed commands from that terminal.
  2. Issue the following command to disconnect:
exit

Future Improvements

  • Create separate configurations/environments for development and production

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •