From 6b345bded976704bd207773d02c7df6633a26366 Mon Sep 17 00:00:00 2001 From: fauno Date: Sat, 6 Apr 2019 18:35:44 -0300 Subject: [PATCH] pasar la master key --- .dockerignore | 1 + .gitignore | 1 + Dockerfile | 3 ++- Makefile | 4 +++- 4 files changed, 7 insertions(+), 2 deletions(-) diff --git a/.dockerignore b/.dockerignore index ed9f8bf..049f6da 100644 --- a/.dockerignore +++ b/.dockerignore @@ -16,3 +16,4 @@ monit.conf README.md TODO* web@.service +data/ diff --git a/.gitignore b/.gitignore index a1aa2a9..5ee73b6 100644 --- a/.gitignore +++ b/.gitignore @@ -30,3 +30,4 @@ /public/docs/ /.yardoc/ /docs/ +/data/ diff --git a/Dockerfile b/Dockerfile index 1f1fb47..0b439ae 100644 --- a/Dockerfile +++ b/Dockerfile @@ -50,7 +50,8 @@ COPY --from=build --chown=app:www-data /home/app/web/.bundle ./.bundle COPY --chown=app:www-data ./docs ./public/docs USER root -ENV RAILS_MASTER_KEY +ARG MASTER_KEY +ENV RAILS_MASTER_KEY=$MASTER_KEY ENV RAILS_ENV production RUN install -m 640 -o root -g root ./monit.conf /etc/monit.d/puma.conf RUN monit -t diff --git a/Makefile b/Makefile index 9a1c74c..6dc2a84 100644 --- a/Makefile +++ b/Makefile @@ -5,6 +5,8 @@ c ?= $(shell date +%F | tr "-" ".") r ?= $(shell git rev-list --count HEAD) name = miniloom/$(d):$(c).$(r) +master_key := $(shell cat config/master.key) + doc: ./bin/yardoc --output-dir=./docs/ \ app/controllers/*.rb \ @@ -15,7 +17,7 @@ clean: rm -rf tmp/cache/assets build: - docker build -t $(name) . + docker build --build-arg MASTER_KEY=$(master_key) -t $(name) . tag: git tag $(c).$(r)