Fix docker compose

account
Никита Поздняков 2 years ago
parent e904e72549
commit 17f4946b7a
No known key found for this signature in database
GPG Key ID: F344106F9804FE5F
  1. 4
      apps/explorer/lib/explorer/application.ex
  2. 11
      config/runtime/dev.exs
  3. 11
      config/runtime/prod.exs
  4. 11
      config/runtime/test.exs
  5. 5
      docker-compose/docker-compose-no-build-ganache.yml
  6. 5
      docker-compose/docker-compose-no-build-geth.yml
  7. 5
      docker-compose/docker-compose-no-build-hardhat-network.yml
  8. 5
      docker-compose/docker-compose-no-build-open-ethereum-nethermind.yml
  9. 5
      docker-compose/docker-compose-no-rust-verification.yml
  10. 7
      docker-compose/docker-compose.yml
  11. 4
      docker-compose/envs/common-blockscout.env

@ -179,8 +179,6 @@ defmodule Explorer.Application do
end end
defp redix_opts do defp redix_opts do
config = Application.get_env(:explorer, Redix) {System.get_env("ACCOUNT_REDIS_URL") || "redis://127.0.0.1:6379", [name: :redix]}
[name: :redix, host: config[:host], port: config[:port]]
end end
end end

@ -103,17 +103,6 @@ variant =
Code.require_file("#{variant}.exs", "apps/explorer/config/dev") Code.require_file("#{variant}.exs", "apps/explorer/config/dev")
redis_port =
case System.get_env("ACCOUNT_REDIS_PORT") && Integer.parse(System.get_env("ACCOUNT_REDIS_PORT")) do
{port, _} -> port
:error -> nil
nil -> nil
end
config :explorer, Redix,
host: System.get_env("ACCOUNT_REDIS_HOST_URL") || "127.0.0.1",
port: redis_port || 6379
############### ###############
### Indexer ### ### Indexer ###
############### ###############

@ -70,17 +70,6 @@ variant =
Code.require_file("#{variant}.exs", "apps/explorer/config/prod") Code.require_file("#{variant}.exs", "apps/explorer/config/prod")
redis_port =
case System.get_env("ACCOUNT_REDIS_PORT") && Integer.parse(System.get_env("ACCOUNT_REDIS_PORT")) do
{port, _} -> port
:error -> nil
nil -> nil
end
config :explorer, Redix,
host: System.get_env("ACCOUNT_REDIS_HOST_URL"),
port: redis_port
############### ###############
### Indexer ### ### Indexer ###
############### ###############

@ -24,17 +24,6 @@ variant =
Code.require_file("#{variant}.exs", "apps/explorer/config/test") Code.require_file("#{variant}.exs", "apps/explorer/config/test")
redis_port =
case System.get_env("ACCOUNT_REDIS_PORT") && Integer.parse(System.get_env("ACCOUNT_REDIS_PORT")) do
{port, _} -> port
:error -> nil
nil -> nil
end
config :explorer, Redix,
host: System.get_env("ACCOUNT_REDIS_HOST_URL") || "127.0.0.1",
port: redis_port || 6379
############### ###############
### Indexer ### ### Indexer ###
############### ###############

@ -1,6 +1,10 @@
version: '3.8' version: '3.8'
services: services:
redis_db:
image: 'redis:alpine'
command: redis-server
db: db:
image: postgres:14 image: postgres:14
restart: always restart: always
@ -16,6 +20,7 @@ services:
depends_on: depends_on:
- db - db
- smart-contract-verifier - smart-contract-verifier
- redis_db
image: blockscout/blockscout:${DOCKER_TAG:-latest} image: blockscout/blockscout:${DOCKER_TAG:-latest}
restart: always restart: always
container_name: 'blockscout' container_name: 'blockscout'

@ -1,6 +1,10 @@
version: '3.8' version: '3.8'
services: services:
redis_db:
image: 'redis:alpine'
command: redis-server
db: db:
image: postgres:14 image: postgres:14
restart: always restart: always
@ -18,6 +22,7 @@ services:
depends_on: depends_on:
- db - db
- smart-contract-verifier - smart-contract-verifier
- redis_db
image: blockscout/blockscout:${DOCKER_TAG:-latest} image: blockscout/blockscout:${DOCKER_TAG:-latest}
restart: always restart: always
container_name: 'blockscout' container_name: 'blockscout'

@ -1,6 +1,10 @@
version: '3.8' version: '3.8'
services: services:
redis_db:
image: 'redis:alpine'
command: redis-server
db: db:
image: postgres:14 image: postgres:14
restart: always restart: always
@ -16,6 +20,7 @@ services:
depends_on: depends_on:
- db - db
- smart-contract-verifier - smart-contract-verifier
- redis_db
image: blockscout/blockscout:${DOCKER_TAG:-latest} image: blockscout/blockscout:${DOCKER_TAG:-latest}
restart: always restart: always
container_name: 'blockscout' container_name: 'blockscout'

@ -1,6 +1,10 @@
version: '3.8' version: '3.8'
services: services:
redis_db:
image: 'redis:alpine'
command: redis-server
db: db:
image: postgres:14 image: postgres:14
restart: always restart: always
@ -18,6 +22,7 @@ services:
depends_on: depends_on:
- db - db
- smart-contract-verifier - smart-contract-verifier
- redis_db
image: blockscout/blockscout:${DOCKER_TAG:-latest} image: blockscout/blockscout:${DOCKER_TAG:-latest}
restart: always restart: always
container_name: 'blockscout' container_name: 'blockscout'

@ -1,6 +1,10 @@
version: '3.8' version: '3.8'
services: services:
redis_db:
image: 'redis:alpine'
command: redis-server
db: db:
image: postgres:14 image: postgres:14
restart: always restart: always
@ -15,6 +19,7 @@ services:
blockscout: blockscout:
depends_on: depends_on:
- db - db
- redis_db
image: blockscout/blockscout:${DOCKER_TAG:-latest} image: blockscout/blockscout:${DOCKER_TAG:-latest}
build: build:
context: .. context: ..

@ -1,11 +1,9 @@
version: '3.8' version: '3.8'
services: services:
redis: redis_db:
image: "redis:alpine" image: 'redis:alpine'
command: redis-server command: redis-server
ports:
- 6379:6379
db: db:
image: postgres:14 image: postgres:14
@ -22,6 +20,7 @@ services:
depends_on: depends_on:
- db - db
- smart-contract-verifier - smart-contract-verifier
- redis_db
image: blockscout/blockscout:${DOCKER_TAG:-latest} image: blockscout/blockscout:${DOCKER_TAG:-latest}
build: build:
context: .. context: ..

@ -138,5 +138,5 @@ RUST_VERIFICATION_SERVICE_URL=http://host.docker.internal:8043/
# ACCOUNT_SENDGRID_SENDER= # ACCOUNT_SENDGRID_SENDER=
# ACCOUNT_SENDGRID_TEMPLATE= # ACCOUNT_SENDGRID_TEMPLATE=
ACCOUNT_CLOAK_KEY= ACCOUNT_CLOAK_KEY=
ACCOUNT_REDIS_HOST_URL=http://host.docker.internal ACCOUNT_ENABLED=false
ACCOUNT_REDIS_PORT=6379 ACCOUNT_REDIS_URL=redis://redis_db:6379
Loading…
Cancel
Save