# Docker Deployment

🐳 **Getting Started with Docker**

In the LightningUserVault repository, you'll find a dedicated `docker` folder that contains everything you need to get started with Docker deployment. Here's the link to the [folder](https://github.com/Aleksao998/LightingUserVault/tree/main/docker) for your convenience.

Inside this folder, there are two essential files:

1. `Dockerfile`: This file contains the instructions to build the LightningUserVault Docker image. It sets up the Go environment, copies your application files, and compiles the application.
2. `docker-compose.yaml`: This file defines and configures the services you'll need to run LightningUserVault. It ensures that all the components of your application run in harmony.

🚀 **What's Bootstrapped Using Docker?**

1. **Webapp (LightningUserVault)**: This is the core application responsible for user data storage and retrieval functionalities.
2. **Postgres**: An advanced relational database system. If you opt for the SQL storage method, user data will be stored here.
3. **Memcached**: An in-memory key-value store known for its high performance. It's used in LigningUserVault to cache data, significantly speeding up data retrieval operations.
4. **Prometheus**: An open-source monitoring and alerting toolkit. It's integrated to collect and store metrics from the application, providing insights into its performance.
5. **Grafana**: A popular open-source platform for monitoring and observability. It visualizes the metrics collected by Prometheus, offering detailed dashboards for better understanding and analysis of the application's performance.

⚙️ **Configuration and Customization**

By default, the Docker deployment uses a set of predefined parameters. However, if you wish to customize these settings, you can easily do so by modifying the `docker-compose.yaml` file. The environment section under the `webapp` service contains various parameters like `LOG_LEVEL`, `SERVER_ADDRESS`, and more. Adjust these values as per your requirements before starting the Docker containers.

📝 **How to (from docker folder):**

```bash
Start the Docker Services:
docker-compose up -d

Stop the Docker Services:
docker-compose down
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://gotolabs.gitbook.io/lightninguservault/getting-started/quickstart-guide/docker-deployment.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
