A Public Key Infrastructure (PKI) Management System designed for corporate offices. This system integrates with HashiCorp Vault to automate and secure certificate lifecycle management, including Root CA and Intermediate CA setup, role management, and certificate issuance for users and servers.
The system allows the generation of two types of certificates:
Ensure the following environment variables are set before running the application:
NEXT_PUBLIC_APP_NAME="PKI"
NEXTAUTH_URL=https://hashicorp.127-0-0-1.nip.io:3000/
NEXT_PUBLIC_API_URL=https://hashicorp.127-0-0-1.nip.io:3000/
NEXTAUTH_SECRET=D6aTsXXqfmxXcPCj/sfckQRR34oWzvsy/ToIO3KlFcuU
AZURE_AD_CLIENT_ID=xxxx-xxxx-xxxx
AZURE_AD_CLIENT_SECRET=xxxx-xxxx-xxxx
AZURE_AD_TENANT_ID=xxxx-xxxx-xxxx
DATABASE_URL="postgresql://root:S3cret@postgres:5432/pki?schema=public"
DIRECT_DATABASE_URL="postgresql://root:S3cret@postgres:5432/pki?schema=public"
To run the PKI Management System as a Docker container, follow these steps:
Run the Docker container with an interactive shell:
docker run -it -p 3000:3000 --env-file .env --network pki_postgres_network anavpdel/pki-management /bin/bash
Apply database migrations:
npx prisma migrate deploy
Start the application:
npm start
Alternatively, restart the container without an interactive shell:
docker run -it -p 3000:3000 --env-file .env --network pki_postgres_network anavpdel/pki-management
Instead of using --env-file .env, you can directly pass environment variables to the container using the -e flag:
docker run -it -p 3000:3000 \
-e NEXT_PUBLIC_APP_NAME="PKI" \
-e NEXTAUTH_URL="https://hashicorp.127-0-0-1.nip.io:3000/" \
-e NEXT_PUBLIC_API_URL="https://hashicorp.127-0-0-1.nip.io:3000/" \
-e NEXTAUTH_SECRET="D6aTsXXqfmxXcPCj/sfckQRR34oWzvsy/ToIO3KlFcuU" \
-e AZURE_AD_CLIENT_ID="xxxx-xxxx-xxxx" \
-e AZURE_AD_CLIENT_SECRET="xxxx-xxxx-xxxx" \
-e AZURE_AD_TENANT_ID="xxxx-xxxx-xxxx" \
-e DATABASE_URL="postgresql://root:S3cret@postgres:5432/pki?schema=public" \
-e DIRECT_DATABASE_URL="postgresql://root:S3cret@postgres:5432/pki?schema=public" \
--network pki_postgres_network anavpdel/pki-management
Content type
Image
Digest
sha256:c7bd09ffe…
Size
631.7 MB
Last updated
over 1 year ago
docker pull anavpdel/pki-management