From 0f46f14a4aa0f9ec1c9542b8693d803b486d6531 Mon Sep 17 00:00:00 2001 From: bressani Date: Mon, 15 Apr 2019 20:56:07 -0300 Subject: [PATCH] Fix production environment --- .gitignore | 3 +++ Dockerfile | 2 +- docker-compose.yml | 2 ++ manifests/quacker-deployment.yaml | 3 +++ 4 files changed, 9 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 757f720..a35e51f 100644 --- a/.gitignore +++ b/.gitignore @@ -33,3 +33,6 @@ /yarn-error.log yarn-debug.log* .yarn-integrity + +# Ignore secrets +/manifests/quacker-env-secrets.yml diff --git a/Dockerfile b/Dockerfile index 1709e0b..8131a5d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -20,4 +20,4 @@ RUN bundle exec rails webpacker:install EXPOSE 3000 # # Start the main process. -CMD ["rails", "server", "-b", "0.0.0.0"] +ENTRYPOINT ["rails", "server", "-e", "$RAILS_ENV", "-b", "0.0.0.0"] diff --git a/docker-compose.yml b/docker-compose.yml index 5131798..1019009 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -4,3 +4,5 @@ services: build: . ports: - "3000:3000" + environment: + - RAILS_ENV=development diff --git a/manifests/quacker-deployment.yaml b/manifests/quacker-deployment.yaml index 6c3fae2..408a4b1 100644 --- a/manifests/quacker-deployment.yaml +++ b/manifests/quacker-deployment.yaml @@ -20,3 +20,6 @@ spec: image: gcr.io/omega-metric-236502/quacker:1.0.0 ports: - containerPort: 3000 + envFrom: + - configMapRef: + name: env-secrets