This repository contains the Docker setup for deploying the coverage API and visualization services locally for coverage.seattlecommunitynetwork.org . It includes the following components:
- ccn-coverage-api: The backend API service.
- ccn-coverage-vis: The frontend visualization service.
- MongoDB: The database service.
Ensure you have the following installed on your system:
Follow these steps to deploy the services using Docker Compose.
git clone https://github.com/Local-Connectivity-Lab/ccn-coverage-docker.git
cd ccn-coverage-docker
Ensure the MONGODB_URI
and API_URL
environment variables are correctly set in the docker-compose.yml
file.
services:
ccn-coverage-api:
...
environment:
- MONGODB_URI=mongodb://mongodb:27017/api-data
ccn-coverage-vis:
...
environment:
- API_URL=http://ccn-coverage-api:3000
To build and start the services, run the following command:
docker compose up -d
-
Check the running containers:
docker ps
You should see the containers for
ccn-coverage-api
,ccn-coverage-vis
, andmongodb
running. -
Access the services in your browser:
- API service:
http://localhost:3000
- Visualization service:
http://localhost:3002
- API service:
-
Check the logs for any errors:
docker compose logs -f
To stop the running services, use:
docker compose down
If you make changes to the Dockerfiles or the source code, rebuild the services:
docker compose up --build -d
To clean up unused Docker images and free up space, run:
docker system prune -a
-
Check container logs for errors:
docker logs <container_name>
-
Verify MongoDB connection:
docker exec -it ccn-coverage-docker-mongodb-1 mongo use api-data show collections
Feel free to open issues or submit pull requests for any improvements or bug fixes.