Docker
Learn how to run Infisical with Docker.
Prerequisites:
- Basic knowledge of Docker
- Have Docker installed on your system. If not, follow the installation guide here.
Infisical is available as a single Docker image to ease deployment. This Docker image only includes the application code, meaning you must supply a connection to a Postgres database and a Redis instance. The following guide provides a detailed step-by-step walkthrough on how you can deploy Infisical with Docker.
Pull the Infisical Docker image
Visit Docker Hub and select a version of Infisical image you would like to deploy. Then run the following command in your terminal to pull the specific Infisical Docker image.
Remember to replace <version>
with the docker image tag of your choice.
Run Postgres schema migration
Before you can start the instance of Infisical, you need to run the database schema migrations. Follow the step by step guide here on running schema migrations for Infisical.
Start Infisical
For a minimal installation of Infisical, you must configure ENCRYPTION_KEY
, AUTH_SECRET
, DB_CONNECTION_URI
, SITE_URL
, and REDIS_URL
. View all available configurations.
We recommend using Cloud-based Platform as a Service (PaaS) solutions for PostgreSQL and Redis to ensure high availability.
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:
The above environment variable values are only to be used as an example and should not be used in production
Once the container is running, verify the installation by opening your web browser and navigating to http://localhost:80
.
Additional discussion
It’s important to note that the above is a basic example of deploying Infisical using Docker. In practice, for production deployments, you may want to use container orchestration platforms such as AWS ECS, Google Cloud Run, or Kubernetes. These platforms offer additional features like scalability, load balancing, and automated deployment, making them suitable for handling production-level traffic and providing high availability.
Was this page helpful?