Warning
This repository has been archived and is no longer maintained. The code is provided for historical reference and may contain unpatched or unknown vulnerabilities. It should not be used in production systems.
This application runs in Docker. There are 5 containers for development.
- A React application
- A Django application
- A PostgreSQL database for application data
- A PostgreSQL database for user form data
- A PGAdmin container
Note: This application uses two database containers for reasons obvious only in production
The application environment is already configured through a variety of .env.local files. These files contain only local development credentials, and safely live in version control.
To run this application, follow the below instructions
Enter the /app directory and run npm install.
Enter the root directory of the application, and run:
docker-compose -f docker-compose.local.yaml builddocker-compose -f docker-compose.local.yaml up
Next, to load data into the postgres container, you need the OSGeo4W utility.
Important: OSGeo4W is a Windows utility. I don't know if there are Mac or Linux alternatives.
With the docker-compose stack up and running, open the OSGeo4W application/shell, and run the following command:
ogr2ogr -overwrite -t_srs "EPSG:4326" -f "PostgreSQL" PG:"host=localhost user=postgres dbname=data_db password=local" -nlt CONVERT_TO_LINEAR -nlt PROMOTE_TO_MULTI "C:\Users\USER\path\to\database.gdb.zip"
Notes:
The command uses the username, dbname, and password variables defined the .env.local files.
It also targets a zipped .gdb file. The shell throws a warning saying it might take a while, but on a tower it only takes about 10 seconds.
Navigate to http://localhost:3005
PGAdmin
You can navigate to http://localhost:5050 and enter the credentials from the /gdb/environment/.env.local.pgadmin to look at the data in the database.
You'll need to register the server by naming it, and then typing in the required POSTGRES credentials from /gdb/environment/.env.local.npd.
nathan.woodruff@inl.gov