mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-09-22 13:39:35 +00:00
change flag --stage to --env
This commit is contained in:
@@ -1,3 +1,23 @@
|
||||
---
|
||||
title: "Docker Compose"
|
||||
---
|
||||
|
||||
## Instructions
|
||||
|
||||
### Step 1: Open the integrations csonsole
|
||||
|
||||
Open the Infisical Dashboard. Choose the project in which you want to set up the intergation. Go to the integrations tab in the left sidebar.
|
||||
|
||||
### Step 2: Authenticate with Heroku
|
||||
|
||||
Click on Heroku in the list of available integrations. Log in if asked by Heroku and provide the necessary permissions to Infisical. You will afterwards be redirected back to the integrations page.
|
||||
|
||||
Note: during an integration with Heroku, for security reasons, it is impossible to maintain end-to-end encryption. In theory, this lets Infisical decrypt yor environment variables. In practice, we can assure you that this will never be done, and it allows us to protect your secrets from bad actors online. The core Infisical service will always stay end-to-end encrypted. With any questions, reach out support@infisical.com.
|
||||
|
||||
### Step 3: Start integration
|
||||
|
||||
Once the integration is set up, choose a Heroku App that you want to sync the secrets to, and the Infisical project environment that you would to sync the secrets from. Click on the "Start Integration" button.
|
||||
|
||||
### Step 4: You're good to go!
|
||||
|
||||
The integration should now show status 'In Sync'. Every time you edit the secrets, they will be automatically pushed to Heroku. If you want to update anything in your integration, you will have to delete the current one and create a new one.
|
||||
|
||||
@@ -1,3 +1,60 @@
|
||||
---
|
||||
title: "Docker"
|
||||
---
|
||||
|
||||
### Step 1: Add CLI to your Dockerfile
|
||||
|
||||
<Tabs>
|
||||
<Tab title="Alpine">
|
||||
```dockerfile
|
||||
RUN apk add --no-cache bash curl && curl -1sLf \
|
||||
'https://dl.cloudsmith.io/public/infisical/infisical-cli/setup.alpine.sh' | bash \
|
||||
&& apk add infisical
|
||||
```
|
||||
|
||||
</Tab>
|
||||
<Tab title="RedHat/CentOs/Amazon-linux">
|
||||
```dockerfile
|
||||
RUN curl -1sLf \
|
||||
'https://dl.cloudsmith.io/public/infisical/infisical-cli/setup.rpm.sh' | sh \
|
||||
&& yum install -y infisical
|
||||
```
|
||||
</Tab>
|
||||
<Tab title="Debian/Ubuntu">
|
||||
```dockerfile
|
||||
RUN apt-get update && apt-get install -y bash curl && curl -1sLf \
|
||||
'https://dl.cloudsmith.io/public/infisical/infisical-cli/setup.deb.sh' | bash \
|
||||
&& apt-get update && apt-get install -y infisical
|
||||
```
|
||||
</Tab>
|
||||
</Tabs>
|
||||
|
||||
### Step 2: Generate Infisical Token
|
||||
In order for Infisical CLI to authenticate and retrieve your project's secrets without exposing your login credentials, you must generate a Infisical Token.
|
||||
To learn how, visit [Infisical Token](../getting-started/cli/infisical-token). Once you have generated the token, keep it handy.
|
||||
|
||||
### Step 3: Set start command of your container
|
||||
```dockerfile
|
||||
CMD ["infisical", "--env=<you-project-env-name>", "projectId=<your-project-id>", "run", "---", "<your application start command>"]
|
||||
```
|
||||
|
||||
Example
|
||||
```dockerfile
|
||||
CMD ["infisical", "--env=prod", "projectId=62faf98ae0b05e83239b5da41", "run", "---", "npm run start"]
|
||||
```
|
||||
| flag | Description |
|
||||
| ------------ | ----------------------------------- |
|
||||
| `--env` | This is the environment name the CLI will use to pull secrets from your project.
|
||||
| `--projectId` | This is the project id of the token you generated in step 2. |
|
||||
|
||||
To learn more about the flags used above, please visit our [CLI guide](../getting-started/cli/cli-guide)
|
||||
|
||||
### Last step: Tell Docker your Infisical Token
|
||||
|
||||
The Infisical CLI looks out for a environment variable called `INFISICAL_TOKEN`. To expose this environment variable to
|
||||
your container do the following when running the `docker run` command. Remember, the `INFISICAL_TOKEN` is the token you generated in
|
||||
step 2.
|
||||
|
||||
```bash
|
||||
docker run --env INFISICAL_TOKEN=<the-token-you-got-from-step-2>...
|
||||
```
|
||||
Reference in New Issue
Block a user