Skip to content

Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.

docker compose docs with postgres

Maidul Islam1a0a9a74028c
diff --git a/docs/self-hosting/configuration/envars.mdx b/docs/self-hosting/configuration/envars.mdx
index 3ea1762e2a..ed9f843a36 100644
--- a/docs/self-hosting/configuration/envars.mdx
+++ b/docs/self-hosting/configuration/envars.mdx
@@ -18,8 +18,8 @@ Other environment variables are listed below to increase the functionality of yo
Must be a random 32 byte base64 string. Can be generated with `openssl rand -base64 32`
</ParamField>
- <ParamField query="MONGO_URL" type="string" default="none" required>
- Mongo connection string. *TLS based connection string is not yet supported
+ <ParamField query="DB_CONNECTION_URI" type="string" default="none" required>
+ Postgres database connection string.
</ParamField>
<ParamField query="REDIS_URL" type="string" default="none" required>
diff --git a/docs/self-hosting/deployment-options/docker-compose.mdx b/docs/self-hosting/deployment-options/docker-compose.mdx
index 304fffbe37..771d0836f8 100644
--- a/docs/self-hosting/deployment-options/docker-compose.mdx
+++ b/docs/self-hosting/deployment-options/docker-compose.mdx
@@ -2,53 +2,79 @@
title: "Docker Compose"
description: "Run Infisical with Docker Compose template"
---
+Install Infisical using Docker compose. This self hosting method contains all of the required components needed
+to run a functional instance of Infisical.
-<Steps>
- <Step title="Install Docker on your VM">
+## Prerequisites
+- [Docker](https://docs.docker.com/engine/install/)
+- [Docker compose](https://docs.docker.com/compose/install/)
+
+<Warning>
+This Docker Compose configuration is not designed for high-availability production scenarios.
+It includes just the essential components needed to set up an Infisical proof of concept (POC).
+Additional configuration is required to enhance data redundancy and ensure higher availability for production environments.
+</Warning>
+
+## Verify prerequisites
+ To verify that Docker compose and Docker are installed on the machine where you plan to install Infisical, run the following commands.
+
+ Check for docker installation
```bash
- # Example in ubuntu
- apt-get update
- apt-get upgrade
- apt install docker-compose
+ docker
```
- </Step>
- <Step title="Download required files">
- 2.1. Run the command below to download the `.env` file template.
-
+
+ Check for docker compose installation
```bash
- wget -O .env https://raw.githubusercontent.com/Infisical/infisical/main/.env.example
+ docker-compose
```
-
- 2.2. Run the command below to download the docker compose template.
-
+
+## Download docker compose file
+You can obtain the Infisical docker compose file by using a command-line downloader such as `wget` or `curl`.
+If your system doesn't have either of these, you can use a equivalent command that works with your machine.
+
+<Tabs>
+ <Tab title="curl">
```bash
- wget -O docker-compose.yml https://raw.githubusercontent.com/Infisical/infisical/main/docker-compose.yml
+ curl -o docker-compose.prod.yml https://raw.githubusercontent.com/Infisical/infisical/main/docker-compose.prod.yml
```
-
- 2.3. Run the command below to download the `nginx` config file.
-
- ```bash
- mkdir nginx && wget -O ./nginx/default.conf https://raw.githubusercontent.com/Infisical/infisical/main/nginx/default.dev.conf
+ </Tab>
+ <Tab title="wget">
+ ```bash
+ wget -O docker-compose.prod.yml https://raw.githubusercontent.com/Infisical/infisical/main/docker-compose.prod.yml
```
-
- </Step>
- <Step title="Update the .env file">
- Running Infisical requires a few environment variables to be set.
- At minimum, Infisical requires that you set the variables `ENCRYPTION_KEY`, `AUTH_SECRET`, `MONGO_URL`, and `REDIS_URL` which you can read more about [here](/self-hosting/configuration/envars).
+ </Tab>
+</Tabs>
- Tweak the `.env` accordingly.
+## Configure instance credentials
+Infisical requires a set of credentials used for connecting to dependent services such as Postgres, Redis, etc.
+The default credentials can be downloaded using the one of the commands listed below.
+<Tabs>
+ <Tab title="curl">
```bash
- nano .env
+ curl -o .env https://raw.githubusercontent.com/Infisical/infisical/main/.env.example
```
- </Step>
- <Step title="Start Infisical">
- Finally, run the command below to get Infisical up and running (in detached mode).
-
- ```bash
- docker-compose -f docker-compose.yml up -d
+ </Tab>
+ <Tab title="wget">
+ ```bash
+ wget -O .env https://raw.githubusercontent.com/Infisical/infisical/main/.env.example
```
+ </Tab>
+</Tabs>
+
+Once downloaded, the credentials file will be saved to your working directly as `.env` file.
+View all available configurations [here](/self-hosting/configuration/envars).
+
+<Warning>
+ The default .env file contains credentials that are intended solely for testing purposes.
+ For production use, please generate a new `ENCRYPTION_KEY` and `AUTH_SECRET`. Instructions to do so, can be found [here](/self-hosting/configuration/envars)
+</Warning>
+
+## Start Infisical
+Run the command below to start Infisical and all related services.
+
+```bash
+docker-compose -f docker-compose.prod.yml up
+```
- Your Infisical installation is complete and should be running on port `80` or `http://localhost:80`.
- </Step>
-</Steps>
\ No newline at end of file
+Your Infisical instance should now be running on port `80`. To access your instance, visit `http://localhost:80`.
\ No newline at end of file