The goal of this repository is to provide instructions on how to deploy the whole suite of services for the Juripros project to run.
It makes use of Docker to contenarize and orchestrate different parts of the application.
This repository contains the following files and directories:
- Examples: Folder containing resources needed to initialize the services with example data.
- .env: File containing the environmental variables and secrets required by all applications. This file should not be added to the remote repository. An example for the structure is provided in Examples/.env.example.
- .gitignore: Gitignore file for this repository.
- docker-compose.yml: Docker compose file describing how to launch and link all services of the application.
- dockerfile_[...]: Dockerfile(s) describing how to deploy specific services of the application.
- README.md: The Readme file you are currently reading.
Docker is a pre-requirement to use the resources provided in this repository.
For instructions on how to install and test Docker, please refer to the documentation.
Other repositories in the projects are dependencies of this one and need to be cloned before the services can start working.
To do so, please run the following commands from the same folder as the docker-compose.yml file:
git clone https://github.com/jurisearch/LegifranceAPI.git
git clone https://github.com/jurisearch/Scheduler.git
git clone https://github.com/jurisearch/EmbeddingAndRetrieval.git
git clone https://github.com/jurisearch/CustomersAPI.git
git clone https://github.com/jurisearch/Website.gitTo create and start running all the services, run the following command from the same folder as the docker-compose.yml file:
docker compose up -dYou sometime may want to only deploy a specific service (container) of the application. This can be achieved with:
docker compose up -d name_of_servicewhere name_of_service must correspond to one of the services present in the docker-compose.yml file.
In order to load the example data in the Examples folder, please run the following:
docker cp Examples/database_example.dump postgres:/database_example.dump
docker exec -it postgres bash
pg_restore -d "$POSTGRES_DB_NAME" -U "$POSTGRES_USER" -C database_example.dumpFinally, press Ctrl+p followed by Ctrl+q to exit the container without killing it.