Docker configuration for running all Cloudnet projects locally.
The toolkit requires Docker version ≥ 20 and Docker Compose version ≥ 2.2.
First create a directory for all repositories and clone this repository there:
mkdir cloudnet
cd cloudnet
git clone git@github.com:actris-cloudnet/dev-toolkit.gitThen run fetch-repos.sh to fetch other repositories:
cd dev-toolkit
./fetch-repos.shYou can later pull the latest changes by running fetch-repos.sh again.
First, make sure that you have Docker installed. After that:
mkdir -p db/data
docker compose buildThe first run will take a long time. Subsequent runs are faster.
Then, configure data portal environment variables:
cp ../dataportal/backend/dev.env.template ../dataportal/backend/dev.envTo enable DOI minting, You need to the update your dev.env with correct credentials.
Then, install Node dependencies to your host system:
docker compose run --rm dataportal-backend npm install
docker compose run --rm dataportal-frontend npm install
docker compose run --rm dataportal-frontend sh -c 'cd /shared && npm install'
docker compose run --rm storage-service npm installTo destroy existing containers, and build & install the project from the scratch, you can issue:
./clean-install.shUnlock encrypted pid-service test credentials:
cd pid-service/
git-crypt unlockThe system can be run in either local or remote mode. In remote mode storage-service will use production S3,
and processing is disabled (data access is read only).
To start the system in local mode, issue:
docker compose upor
./start.sh localstart.sh is a small wrapper around docker compose.
If you are starting the system in local mode for the first time, you may need to populate the dataportal database.
First, make sure that you have cloned the secrets repository from actris-cloudnet and unlocked them using git-crypt unlock.
To start the system in remote mode, issue:
./populate-db-recent.sh # Download remote dbs
./start.sh remote # Start in remote mode, you will be asked for your GPG passwordAfter the local postgres instance has been populated, it is enough to issue ./start.sh remote to start the system in remote mode.
Stop containers by pressing Ctrl+C.
Destroy containers by running:
docker compose down./populate-db-recent.sh: Download recent data from remote DB../populate-db-full.sh: Download remote DB. Uses a cached DB file if such exists. To force re-download use-u.
For instructions on how to populate the development DB with test fixtures, see here.
It's recommended to install pgcli for interactive use.
After installation, run the following command to access dataportal database:
./connect-to-database.sh dataportalTo access storage-service database, run:
./connect-to-database.sh ssIn some cases, you might want to connect straight to the database. Then use the following commands:
docker compose exec db psql dataportal
docker compose exec db psql ssThe following ports are exposed from the containers to localhost:
8080Development frontend3000Development backend3001Test backend3005Citation service5800PID service5900Storage service54321PostgreSQL8086InfluxDB (username:admin, password:password)5921Storage service mock (for tests)
MIT