Skip to content

A web service for creating & updating various Couchbase ingest documents

License

Notifications You must be signed in to change notification settings

NOAA-GSL/vxFormsUI

Repository files navigation

vxFormsUI

GO service for processing ingest related forms This project is a Go module that uses the Gin web framework and Bootstrap 5 to implement a web-based UI with the following features:

  • Form Selection: Users can choose which form to use from a main page.
  • Dynamic Form Rendering: The UI presents the appropriate form for creating the associated JSON document based on user input.
  • Default Version Value: Any input field named version is pre-filled with the default value "V01".
  • Back Navigation: Each form includes a back button that returns the user to the main page.

Running with Docker and Docker Compose

Prerequisites

  • Docker and Docker Compose installed
  • A credentials file named CREDENTIALS_FILE in the user home directory (or update the path in docker-compose.yml)

Build and Run

  1. Place your credentials in a file named CREDENTIALS_FILE in the home directory.

  2. Build and start the container using Docker Compose from the docker directory:

    cd docker
    docker compose up --build
  3. The app will be available at http://localhost:8080

Stopping

To stop the app, press Ctrl+C in the terminal and run:

docker compose down

Notes

  • The CREDENTIALS_FILE is mounted as a Docker secret and available in the container at /run/secrets/CREDENTIALS_FILE.
  • You can change the port mapping in docker-compose.yml if needed.

ROOT_PATH

You might need a ROOT_PATH environment variable. When deploying under kubernetes, for example, it is often necessary to deploy the container under a specifc subpath to a base URL. This can be accomplished by setting ROOT_PATH in the environment. For example, if you do

cd .../VxFormsUI
export ROOT_PATH="/vx/formsui"
go run .

the service will be available at the URL

http://localhost:8080/vx/formsui

In the AVID deployment the VxForms is deployed at

https://apps-dev.gsd.esrl.noaa.gov/vx/formsui

by setting

ROOT_PATH="/vx/formsui"

in the environment.

About

A web service for creating & updating various Couchbase ingest documents

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •