Skip to content

Run any application with secrets anywhere using the Pangea secrets CLI

License

Notifications You must be signed in to change notification settings

pangeacyber/pangea-cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

53 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Pangea Secrets CLI

The easiest way to scrap .env files and store your API keys securely on Pangea.

Get Started

Video Walkthrough on Getting Started

Installation

For linux / macOS systems

curl -L -o /usr/local/bin/pangea "https://github.com/pangeacyber/pangea-cli/releases/latest/download/pangea-$(uname -s)-$(uname -m)" && chmod +x /usr/local/bin/pangea

Login to Pangea

pangea login

Note: Follow the prompt and paste your Pangea vault token

Create Workspace

pangea create

Select Workspace

pangea select

Migrate .env file to a Pangea Workspace

pangea migrate -f .env

Run with secrets from Pangea

pangea run -c <APP_COMMAND>
# Example - pangea run -c npm run dev

Usage

Docker Container

Step 1: Install the CLI in your Dockerfile. Here's an example for a Node app

FROM node:lts-bullseye

# Install Pangea CLI
RUN curl -L -o /bin/pangea "https://github.com/pangeacyber/pangea-cli/releases/latest/download/pangea-$(uname -s)-$(uname -m)"

WORKDIR /app
COPY . .

RUN npm install

ENTRYPOINT ["pangea", "run", "-c"]
# APP Command
CMD ["npm", "run", "dev"]

Now run your docker container by passing in the PANGEA_TOKEN and PANGEA_DEFAULT_FOLDER.

docker run \
    -e PANGEA_TOKEN=pts... \
    -e PANGEA_DOMAIN=aws.us.pangea.cloud \
    -e PANGEA_DEFAULT_FOLDER=/secrets/... \
    <IMAGE_NAME>