mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-09-22 13:39:35 +00:00
Restyle self-hosting docs for Docker / Docker Compose
This commit is contained in:
@@ -1,51 +1,54 @@
|
|||||||
---
|
---
|
||||||
title: "Docker Compose"
|
title: "Docker Compose"
|
||||||
description: "Learn to install Infisical using our Docker Compose template"
|
description: "Run Infisical with Docker Compose template"
|
||||||
---
|
---
|
||||||
|
|
||||||
## Install Docker on your VM
|
<Steps>
|
||||||
|
<Step title="Install Docker on your VM">
|
||||||
|
```bash
|
||||||
|
# Example in ubuntu
|
||||||
|
apt-get update
|
||||||
|
apt-get upgrade
|
||||||
|
apt install docker-compose
|
||||||
|
```
|
||||||
|
</Step>
|
||||||
|
<Step title="Download required files">
|
||||||
|
2.1. Run the command below to download the `.env` file template.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
wget -O .env https://raw.githubusercontent.com/Infisical/infisical/main/.env.example
|
||||||
|
```
|
||||||
|
|
||||||
|
2.2. Run the command below to download the docker compose template.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
wget -O docker-compose.yml https://raw.githubusercontent.com/Infisical/infisical/main/docker-compose.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
|
||||||
|
```
|
||||||
|
|
||||||
|
</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).
|
||||||
|
|
||||||
```bash
|
Tweak the `.env` accordingly.
|
||||||
# Example in ubuntu
|
|
||||||
apt-get update
|
|
||||||
apt-get upgrade
|
|
||||||
apt install docker-compose
|
|
||||||
```
|
|
||||||
|
|
||||||
## Download the required files
|
```bash
|
||||||
|
nano .env
|
||||||
|
```
|
||||||
|
</Step>
|
||||||
|
<Step title="Start Infisical">
|
||||||
|
Finally, run the command below to get Infisical up and running (in detached mode).
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Download env file template
|
docker-compose -f docker-compose.yml up -d
|
||||||
wget -O .env https://raw.githubusercontent.com/Infisical/infisical/main/.env.example
|
```
|
||||||
|
|
||||||
# Download docker compose template
|
Your Infisical installation is complete and should be running on port `80` or `http://localhost:80`.
|
||||||
wget -O docker-compose.yml https://raw.githubusercontent.com/Infisical/infisical/main/docker-compose.yml
|
</Step>
|
||||||
|
</Steps>
|
||||||
# Download nginx config
|
|
||||||
mkdir nginx && wget -O ./nginx/default.conf https://raw.githubusercontent.com/Infisical/infisical/main/nginx/default.dev.conf
|
|
||||||
```
|
|
||||||
|
|
||||||
## Update .env file
|
|
||||||
Tweak the `.env` according to your preferences. Refer to the available [environment variables](/self-hosting/configuration/envars)
|
|
||||||
|
|
||||||
```bash
|
|
||||||
# update environment variables like mongo login
|
|
||||||
nano .env
|
|
||||||
```
|
|
||||||
|
|
||||||
<Info>
|
|
||||||
Infisical assumes that you have configured HTTPS. If you didn't configure HTTPS, set `HTTPS_ENABLED` to `false` in the .env file to avoid frequent logouts.
|
|
||||||
</Info>
|
|
||||||
|
|
||||||
## Get the service up and running
|
|
||||||
|
|
||||||
```bash
|
|
||||||
# Start up services in detached mode
|
|
||||||
docker-compose -f docker-compose.yml up -d
|
|
||||||
```
|
|
||||||
|
|
||||||
Your Infisical installation is complete and should be running on [http://localhost:80](http://localhost:80). Please note that the containers are not exposed to the internet and only bind to the localhost. It's up to you to configure a firewall, SSL certificates, and implement any additional security measures.
|
|
||||||
|
|
||||||
<Info>
|
|
||||||
Once installation is complete, you will have to create the first account. No default account is provided.
|
|
||||||
</Info>
|
|
||||||
@@ -1,63 +1,49 @@
|
|||||||
---
|
---
|
||||||
title: "Docker"
|
title: "Docker"
|
||||||
description: "Learn to install Infisical purely on docker"
|
description: "Run Infisical with Docker"
|
||||||
---
|
---
|
||||||
|
|
||||||
The Infisical standalone version combines all the essential components into a single container, making deployment and management more straightforward than other methods.
|
Prerequisites:
|
||||||
|
- Basic knowledge of [Docker](https://www.docker.com/)
|
||||||
|
- Have Docker installed on your system. If not, follow the installation guide [here](https://docs.docker.com/get-docker/).
|
||||||
|
|
||||||
## Prerequisites
|
<Steps>
|
||||||
|
<Step title="Pull the Infisical Docker image">
|
||||||
This guide assumes you have basic knowledge of Docker and have it installed on your system. If you don't have Docker installed, please follow the official installation guide [here](https://docs.docker.com/get-docker/).
|
Run the following command in your terminal to pull the Infisical Docker image:
|
||||||
|
|
||||||
#### System requirements
|
|
||||||
To have a functional deployment, we recommended compute with **2GB of RAM** and **1 CPU**.
|
|
||||||
However, depending on your usage, you may need to further scale up system resources to meet demand.
|
|
||||||
|
|
||||||
## Pull the Infisical Docker image
|
|
||||||
|
|
||||||
Open your terminal or command prompt and enter the following command to pull the Infisical Docker image:
|
|
||||||
|
|
||||||
```
|
|
||||||
docker pull infisical/infisical:latest
|
|
||||||
```
|
|
||||||
|
|
||||||
## Run with docker
|
|
||||||
To run Infisical, we'll need to configure the required configs listed below.
|
|
||||||
Other configs can be found [here](../configuration/envars)
|
|
||||||
|
|
||||||
<ParamField query="ENCRYPTION_KEY" type="string" default="none" required>
|
```
|
||||||
Must be a random 16 byte hex string. Can be generated with `openssl rand -hex 16`
|
docker pull infisical/infisical:latest
|
||||||
</ParamField>
|
```
|
||||||
|
</Step>
|
||||||
|
<Step title="Start Infisical">
|
||||||
|
2.1. 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).
|
||||||
|
|
||||||
|
Once you have added the required environment variables to your docker run command, execute it in your terminal to get Infisical up and running.
|
||||||
|
|
||||||
|
For example:
|
||||||
|
|
||||||
<ParamField query="AUTH_SECRET" type="string" default="none" required>
|
```bash
|
||||||
Must be a random 32 byte base64 string. Can be generated with `openssl rand -base64 32`
|
docker run -p 80:8080 \
|
||||||
</ParamField>
|
-e ENCRYPTION_KEY=f40c9178624764ad85a6830b37ce239a \
|
||||||
|
-e AUTH_SECRET="q6LRi7c717a3DQ8JUxlWYkZpMhG4+RHLoFUVt3Bvo2U=" \
|
||||||
|
-e MONGO_URL="<>" \
|
||||||
|
infisical/infisical:latest
|
||||||
|
```
|
||||||
|
|
||||||
|
<Warning>
|
||||||
|
The above environment variable values are only to be used as an example and should not be used in production
|
||||||
|
</Warning>
|
||||||
|
|
||||||
|
2.2. Once the container is running, verify the installation by opening your web browser and navigating to `http://localhost:80`.
|
||||||
|
</Step>
|
||||||
|
</Steps>
|
||||||
|
|
||||||
<ParamField query="MONGO_URL" type="string" default="none" required>
|
<AccordionGroup>
|
||||||
*TLS based connection string is not yet supported
|
<Accordion title="What are the system requirements for running Infisical?">
|
||||||
</ParamField>
|
To have a functional deployment, we recommended compute with 2GB of RAM and 1 CPU.
|
||||||
|
|
||||||
<ParamField query="REDIS_URL" type="string" default="none" required>
|
However, depending on your usage, you may need to further scale up system resources to meet demand.
|
||||||
Redis connection string
|
</Accordion>
|
||||||
</ParamField>
|
</AccordionGroup>
|
||||||
|
|
||||||
Once you have added the required environment variables to your docker run command, execute it in your terminal.
|
|
||||||
|
|
||||||
```bash
|
|
||||||
docker run -p 80:8080 \
|
|
||||||
-e ENCRYPTION_KEY=f40c9178624764ad85a6830b37ce239a \
|
|
||||||
-e AUTH_SECRET=5239fea3a4720c0e524f814a540e14a2 \
|
|
||||||
-e MONGO_URL="<>" \
|
|
||||||
infisical/infisical:latest
|
|
||||||
```
|
|
||||||
|
|
||||||
<Warning>
|
|
||||||
The above environment variable values are only to be used as an example and should not be used in production
|
|
||||||
</Warning>
|
|
||||||
|
|
||||||
## Verify the installation:
|
|
||||||
Once the container is running, open a web browser and navigate to http://localhost:80. That's it! You have successfully installed the Infisical application using a single Docker image.
|
|
||||||
|
|
||||||
<Info>
|
|
||||||
Once installation is complete, you will have to create the first account. No default account is provided.
|
|
||||||
</Info>
|
|
||||||
Reference in New Issue
Block a user