Skip to content

Commit

Permalink
send user output to stderr
Browse files Browse the repository at this point in the history
  • Loading branch information
kendavis2 committed Mar 19, 2019
1 parent 110906c commit 9b36eff
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ TL;DR: cStore encrypts and stores environment configuration remotely using stora
│ └── fargate.yml
│ └── docker-compose.yml
```
The `cstore.yml` catalog and hidden `.cstore` ghost files take the place of the stored `*.env` files. The `*.env` files can be encrypted and stored in AWS S3 and no longer checked into source control.
The `cstore.yml` catalog and hidden `.cstore` ghost files take the place of the stored `*.env` files. The `*.env` files can be encrypted and stored in AWS S3 or AWS Parameter Store and no longer checked into source control.

When the repository has been cloned or the project shared, running `$ cstore pull` in the same directory as the `cstore.yml` catalog file or any of the `.cstore` ghost replacement files will locate, download and decrypt the `*.env` files to their respective original paths restoring the project's environment configuration.

Expand All @@ -36,11 +36,11 @@ When the repository has been cloned or the project shared, running `$ cstore pul
Ensure a supported [storage](docs/STORES.md) location is already set up and available.

#### Install/Upgrade ####
mac: `$ sudo curl -L -o /usr/local/bin/cstore https://github.com/turnerlabs/cstore/releases/download/v2.4.0-alpha/cstore_darwin_amd64 && sudo chmod +x /usr/local/bin/cstore`
mac: `$ sudo curl -L -o /usr/local/bin/cstore https://github.com/turnerlabs/cstore/releases/download/v2.4.1-alpha/cstore_darwin_amd64 && sudo chmod +x /usr/local/bin/cstore`

linux: `$ sudo curl -L -o /usr/local/bin/cstore https://github.com/turnerlabs/cstore/releases/download/v2.4.0-alpha/cstore_linux_386 && sudo chmod +x /usr/local/bin/cstore`
linux: `$ sudo curl -L -o /usr/local/bin/cstore https://github.com/turnerlabs/cstore/releases/download/v2.4.1-alpha/cstore_linux_386 && sudo chmod +x /usr/local/bin/cstore`

win: `wget https://github.com/turnerlabs/cstore/releases/download/v2.4.0-alpha/cstore_windows_amd64.exe` (add download dir to the PATH environment variable)
win: `wget https://github.com/turnerlabs/cstore/releases/download/v2.4.1-alpha/cstore_windows_amd64.exe` (add download dir to the PATH environment variable)

The first push creates a catalog file in the same directory that can be checked into source control. Subsequent commands executed in the same directory will use the existing catalog.

Expand Down
3 changes: 2 additions & 1 deletion cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (
"os"

"github.com/fatih/color"
"github.com/mattn/go-colorable"
"github.com/spf13/cobra"
"github.com/spf13/viper"
"github.com/turnerlabs/cstore/components/catalog"
Expand All @@ -25,7 +26,7 @@ var (
cfgFile string
uo cfg.UserOptions
ioStreams = models.IO{
UserOutput: color.Output,
UserOutput: colorable.NewColorableStderr(),
UserInput: os.Stdin,
Export: os.Stdout,
}
Expand Down
4 changes: 2 additions & 2 deletions docs/DOCKER.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ exec ./my-application
```docker
ENTRYPOINT ["./docker-entrypoint.sh"]
```
4. Update the `Dockerfile` to install [cStore](https://github.com/turnerlabs/cstore/releases/download/v2.4.0-alpha/cstore_linux_amd64) for Linux (or the appropriate os) adding execute permissions.
4. Update the `Dockerfile` to install [cStore](https://github.com/turnerlabs/cstore/releases/download/v2.4.1-alpha/cstore_linux_amd64) for Linux (or the appropriate os) adding execute permissions.
```docker
RUN curl -L -o /usr/local/bin/cstore https://github.com/turnerlabs/cstore/releases/download/v2.4.0-alpha/cstore_linux_386 && chmod +x /usr/local/bin/cstore
RUN curl -L -o /usr/local/bin/cstore https://github.com/turnerlabs/cstore/releases/download/v2.4.1-alpha/cstore_linux_386 && chmod +x /usr/local/bin/cstore
```
5. Update the `docker-compose.yml` file to specify which environment config should be pulled by the `docker-entrypoint.sh` script.
```bash
Expand Down

0 comments on commit 9b36eff

Please sign in to comment.