This repo will help you get started getting a dataset into ERDDAP using Axiom's ERDDAP Docker image. It includes a demonstration dataset. This repo is not meant to be used for deploying ERDDAP on a server, just for testing datasets locally on your own computer.
We will install using Docker, which installs ERDDAP into a 'container' on your computer, and avoids the need for you to install and configure all the components that ERDDAP relies on to work.
- Install docker and docker-compose. Depending on your operating system, docker-compose may come with Docker
- if you are on Windows, see additional instructions at bottom of this file
cd
into the directory of this git repo and rundocker-compose up
. This may take a while to run the first time as it needs to dowload the Docker images- See if it works by going to http://localhost:8070/erddap
-
put your data files (eg .nc or .csv files) into a new folder in the 'datasets' folder.
-
Run
sh GenerateDatasetsXml.sh
in the terminal from this directory:- Use
EDDTableFromAsciiFiles
for .csv files andEDDTableFromMultidimNcFiles
for netCDF (.nc) files. - 'Starting directory' is your new directory where your files are located, eg:
/datasets/sample-dataset
. Any path you enter must start with/datasets
which is linked to thedatasets
folder in this directory. The filesystem inside the docker container is different than the filesystem on your computer. - Most of these questions can be left blank for now, just press enter to use default values
- Use
If this was successful, it will create a snippet which is output to logs
folder. Paste that snipped into the file config/datasets.xml
-
datasets.xml
is where the datasets are configured. There are too many options to list here, see https://coastwatch.pfeg.noaa.gov/erddap/download/setupDatasetsXml.html for help. Once you have edited it to your liking, make note of the datasetID you are working on. -
To test your configuration, ERDDAP has a built in tool to debug your dataset, to use it run
sh DasDds.sh
and then type in your dataset ID when prompted.
After a change is made to a dataset, you can restart erddap with docker-compose restart
- Use
docker-compose restart
docker-compose down
- run
docker-compose logs -f
to see what erddap is doing - See http://localhost:8070/erddap/status.html for status
- See
logs/log.txt
for more information - Test your dataset by running the debugging tool -
sh DasDds.sh
and entering the datasetID
- Install Windows Subsystem for Linux 2
- Follow these instructions to Make docker in WSL talk to Docker for Windows
- when Docker asks, give permission to access C drive