Skip to content

mozilla-magnet/magnet-services

Repository files navigation

Magnet Services

This repository contains various backend services for Project Magnet, each to be orchestrated via docker-compose. For more information on each component, see each respective README.

To start all services, run docker-compose up. If the code is changed for a component, its docker image will need to be rebuilt. This can be achieved by running docker-compose build <servicename>.

Content Database (service name: db)

The PostGIS database running in a container.

docker-compose up db

Locally exposed on localhost:5432.

Content Service (service name: content)

See content-service/README

docker-compose up content

Locally exposed on localhost:3000.

Shortener Service (service name: shortener)

See magnet-shortener/README

docker-compose up shortener

Locally exposed on localhost:3001.

Metadata Service (service name: metadata)

See magnet-metadata-service

docker-compose up metadata

Locally exposed on localhost:3002

Deploying to Production

  1. Head to the 'production' server and switch to the 'metadataservice' user.
  2. Enter the magnet-services directory and do a git pull.
  3. Run ./update-prod.sh <... space separated list of service names to restart>

License

All code licensed under the MPL-2.0 license.