From 9f6f713aee22137ba9f99d535a3a22a325833efc Mon Sep 17 00:00:00 2001 From: Kirill Grachev Date: Fri, 19 May 2023 19:27:51 +0300 Subject: [PATCH] SNRK-95: Add secrets --- .dockerignore | 3 ++- Dockerfile | 2 ++ docker-compose.yml | 8 +++++++- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/.dockerignore b/.dockerignore index c098152..8afe6ec 100644 --- a/.dockerignore +++ b/.dockerignore @@ -20,4 +20,5 @@ gradlew.bat Dockerfile tmp -rundata \ No newline at end of file +rundata +credentials.json \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index f879477..a8aca71 100644 --- a/Dockerfile +++ b/Dockerfile @@ -20,4 +20,6 @@ RUN ./gradlew clean build EXPOSE 8080 +RUN mkdir -p ~/.aws/ && ln -s /run/secrets/credentials.json ~/.aws/credentials.json + CMD ./gradlew :snark-main:run_server \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml index fbdf9ba..28ae254 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -9,5 +9,11 @@ services: - 8081 volumes: - storage:/app/rundata + secrets: + - credentials.json volumes: - storage: \ No newline at end of file + storage: + +secrets: + credentials.json: + file: ./credentials.json \ No newline at end of file