Skip to content

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

Create docker-compose.hsm.prod.yml

Daniel Hougaardd0b3c6b66a36
diff --git a/docker-compose.hsm.prod.yml b/docker-compose.hsm.prod.yml
new file mode 100644
index 0000000000..1c3a72ece8
--- /dev/null
+++ b/docker-compose.hsm.prod.yml
@@ -0,0 +1,74 @@
+version: "3"
+
+services:
+ db-migration:
+ container_name: infisical-db-migration
+ depends_on:
+ db:
+ condition: service_healthy
+ image: infisical/infisical:latest-postgres
+ env_file: .env
+ command: npm run migration:latest
+ pull_policy: always
+ networks:
+ - infisical
+
+ backend:
+ container_name: infisical-backend
+ restart: unless-stopped
+ depends_on:
+ db:
+ condition: service_healthy
+ redis:
+ condition: service_started
+ db-migration:
+ condition: service_completed_successfully
+ image: infisical/infisical:latest-postgres
+ pull_policy: always
+ env_file: .env
+ ports:
+ - 80:8080
+ environment:
+ - NODE_ENV=production
+ volumes:
+ - /opt/infisical-hsm:/opt/infisical-hsm
+ networks:
+ - infisical
+
+ redis:
+ image: redis
+ container_name: infisical-dev-redis
+ env_file: .env
+ restart: always
+ environment:
+ - ALLOW_EMPTY_PASSWORD=yes
+ ports:
+ - 6379:6379
+ networks:
+ - infisical
+ volumes:
+ - redis_data:/data
+
+ db:
+ container_name: infisical-db
+ image: postgres:14-alpine
+ restart: always
+ env_file: .env
+ volumes:
+ - pg_data:/var/lib/postgresql/data
+ networks:
+ - infisical
+ healthcheck:
+ test: "pg_isready --username=${POSTGRES_USER} && psql --username=${POSTGRES_USER} --list"
+ interval: 5s
+ timeout: 10s
+ retries: 10
+
+volumes:
+ pg_data:
+ driver: local
+ redis_data:
+ driver: local
+
+networks:
+ infisical: