Skip to content

Commit

Permalink
Add docker readme
Browse files Browse the repository at this point in the history
  • Loading branch information
yassinsws committed Sep 3, 2024
1 parent 6ca8caa commit 9c722e0
Showing 1 changed file with 81 additions and 1 deletion.
82 changes: 81 additions & 1 deletion README.MD
Original file line number Diff line number Diff line change
Expand Up @@ -61,4 +61,84 @@ Currently, Pyris empowers [Iris](https://artemis.cit.tum.de/about-iris), a virtu
- Access API docs: http://localhost:8000/docs

### With docker
TBD
Pyris can be deployed using Docker, which provides an easy way to set up the application in a consistent environment.
Below are the instructions for setting up Pyris using Docker.

#### Prerequisites
- Ensure Docker and Docker Compose are installed on your machine.
- Clone the Pyris repository to your local machine.
-
#### Setup Instructions

1. **Build and Run the Containers**

You can run Pyris in different environments: development or production. Docker Compose is used to orchestrate the different services, including Pyris, Weaviate, and Nginx.

- **For Development:**

Use the following command to start the development environment:

```bash
docker-compose -f docker-compose/pyris-dev.yml up --build
```

This command will:
- Build the Pyris application from the Dockerfile.
- Start the Pyris application along with Weaviate in development mode.
- Mount the local configuration files (`application.local.yml` and `llm-config.local.yml`) for easy modification.

The application will be available at `http://localhost:8000`.

- **For Production:**

Use the following command to start the production environment:

```bash
docker-compose -f docker-compose/pyris-production.yml up -d
```

This command will:
- Pull the latest Pyris image from the GitHub Container Registry.
- Start the Pyris application along with Weaviate and Nginx in production mode.
- Nginx will serve as a reverse proxy, handling SSL termination if certificates are provided.

The application will be available at `https://<your-domain>`.

2. **Configuration**

- **Weaviate**: Weaviate is configured via the `weaviate.yml` file. By default, it runs on port 8001.
- **Pyris Application**: The Pyris application configuration is handled through environment variables and mounted YAML configuration files.
- **Nginx**: Nginx is used for handling requests in a production environment and is configured via `nginx.yml`.

3. **Accessing the Application**

- For development, access the API documentation at: `http://localhost:8000/docs`
- For production, access the application at your domain (e.g., `https://<your-domain>`).

4. **Stopping the Containers**

To stop the running containers, use:

```bash
docker-compose -f docker-compose/pyris-dev.yml down
```

or

```bash
docker-compose -f docker-compose/pyris-production.yml down
```

5. **Logs and Debugging**

- View the logs for a specific service, e.g., Pyris:

```bash
docker-compose -f docker-compose/pyris-dev.yml logs pyris-app
```

- For production, ensure that Nginx and Weaviate services are running smoothly and check their respective logs if needed.

---

This setup should help you run the Pyris application in both development and production environments with Docker. Ensure you modify the configuration files as per your specific requirements before deploying.

0 comments on commit 9c722e0

Please sign in to comment.