This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# build consul docker | |
❯❯ docker build -t erangaeb/consul:0.1 . | |
# build vault docker with consul storage backend config | |
❯❯ docker build -t erangaeb/vault-consul:0.1 . | |
# deploy consul | |
❯❯ docker-compose up -d consul |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: '3.8' | |
services: | |
vault-consul: | |
image: erangaeb/vault-consul:0.1 | |
ports: | |
- 8200:8200 | |
environment: | |
- VAULT_ADDR=http://127.0.0.1:8200 | |
- VAULT_API_ADDR=http://127.0.0.1:8200 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"backend": { | |
"consul": { | |
"address": "consul:8500", | |
"path": "vault/" | |
} | |
}, | |
"listener": { | |
"tcp":{ | |
"address": "0.0.0.0:8200", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# base image | |
FROM alpine:3.14 | |
# set vault version | |
ENV VAULT_VERSION 1.8.2 | |
# create a new directory | |
RUN mkdir /vault | |
# download dependencies |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"datacenter": "rahasak", | |
"data_dir": "/consul/data", | |
"log_level": "DEBUG", | |
"server": true, | |
"ui": true, | |
"ports": { | |
"dns": 53 | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# base image | |
FROM alpine:3.14 | |
# set consul version | |
ENV CONSUL_VERSION 1.10.2 | |
# create a new directory | |
RUN mkdir /consul | |
# download dependencies |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# build docker | |
docker build -t erangaeb/vault-filesystem:0.1 . | |
# run vault with filesystem backend | |
docker-compose up -d vault-filesystem | |
❯❯ docker ps | |
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: '3.8' | |
services: | |
vault-filesystem: | |
image: erangaeb/vault-filesystem:0.1 | |
ports: | |
- 8200:8200 | |
environment: | |
- VAULT_ADDR=http://127.0.0.1:8200 | |
- VAULT_API_ADDR=http://127.0.0.1:8200 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"backend": { | |
"file": { | |
"path": "vault/data" | |
} | |
}, | |
"listener": { | |
"tcp":{ | |
"address": "0.0.0.0:8200", | |
"tls_disable": 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# base image | |
FROM alpine:3.14 | |
# set vault version | |
ENV VAULT_VERSION 1.8.2 | |
# create a new directory | |
RUN mkdir /vault | |
# download dependencies |