From b63c22d6f9bf5fe527257c8b99f26e08d5c35cfa Mon Sep 17 00:00:00 2001 From: Konstantin Zolotarev Date: Fri, 26 Oct 2018 14:12:32 +0300 Subject: [PATCH] Reworked docker. minified image from 344 -> 15 Mb --- .dockerignore | 4 ++++ Dockerfile => docker/Dockerfile | 4 ---- Makefile => docker/Makefile | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) rename Dockerfile => docker/Dockerfile (76%) rename Makefile => docker/Makefile (97%) diff --git a/.dockerignore b/.dockerignore index f2c7590ef7..b52edd4f47 100644 --- a/.dockerignore +++ b/.dockerignore @@ -3,3 +3,7 @@ deps apps/block_scout_web/assets/node_modules apps/explorer/node_modules test +.git +.circleci +logs +apps/*/test diff --git a/Dockerfile b/docker/Dockerfile similarity index 76% rename from Dockerfile rename to docker/Dockerfile index 8325ad9170..9c1a4809e2 100644 --- a/Dockerfile +++ b/docker/Dockerfile @@ -6,10 +6,6 @@ EXPOSE 4000 ENV PORT=4000 \ MIX_ENV="prod" \ - ETHEREUM_JSONRPC_VARIANT="ganache" \ - ETHEREUM_JSONRPC_HTTP_URL="http://host.docker.internal:7545" \ - ETHEREUM_JSONRPC_WEB_SOCKET_URL="ws://host.docker.internal:7545" \ - DATABASE_URL="postgresql://postgres:@host.docker.internal:5432/explorer?ssl=false" \ SECRET_KEY_BASE="RMgI4C1HSkxsEjdhtGMfwAHfyT6CKWXOgzCboJflfSm4jeAlic52io05KB6mqzc5" # Cache elixir deps diff --git a/Makefile b/docker/Makefile similarity index 97% rename from Makefile rename to docker/Makefile index 3de6a1460a..56906fcc37 100644 --- a/Makefile +++ b/docker/Makefile @@ -32,7 +32,7 @@ ifdef HAS_BLOCKSCOUT_IMAGE @echo "==> Image exist. Using $(DOCKER_IMAGE)" else @echo "==> No image found trying to build one..." - # @docker build -t $(DOCKER_IMAGE) . + @docker build -f ./Dockerfile -t $(DOCKER_IMAGE) ../ endif migrate: build postgres