This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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
package com.pagero.services.codelist.restapi.actors | |
import akka.actor.{ActorSystem, Props} | |
import akka.http.scaladsl.model.Multipart.BodyPart | |
import akka.http.scaladsl.model._ | |
import akka.http.scaladsl.server.Directives.{complete, path, post, _} | |
import akka.http.scaladsl.server.Route | |
import akka.http.scaladsl.server.directives.RouteDirectives | |
import akka.pattern.ask | |
import akka.util.Timeout |
This file contains hidden or 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
private def processFile(fileData: Multipart.FormData)(implicit ec: ExecutionContextExecutor) = { | |
val f = fileData.parts.mapAsync(1) { bodyPart => | |
def appendByteString(payload: ByteString, byteString: ByteString): ByteString = { | |
payload.concat(byteString) | |
} | |
bodyPart.entity.dataBytes.runFold(ByteString.empty)(appendByteString) | |
} | |
f.runFold(ByteString.empty) { case (a, b) => |
This file contains hidden or 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
JWTAUTHORITY=http://192.168.64.43:9001/auth/realms/openrmf | |
JWTCLIENT=openrmf |