Skip to content

Commit 2be39f5

Browse files
JOYclaude
andcommitted
fix: restore version files to v10.2.1 from upstream
Sync-upstream workflow's "fixup version files" step did not commit the version restore for v10.2.1, leaving mix.exs at 10.0.6 (last explicit "Bump version to 10.0.6" commit by upstream on 2026-03-16). Also restored rel/config.exs and docker/Makefile which had been removed locally — they exist in upstream v10.2.1. Without this fix, mix release builds at /app/releases/10.0.6/ but the Dockerfile copies config_helper.exs to /app/releases/RELEASE_VERSION/ (=10.2.1), causing a runtime.exs ENOENT crash on container boot. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 9cd8d02 commit 2be39f5

9 files changed

Lines changed: 244 additions & 8 deletions

File tree

apps/block_scout_web/mix.exs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ defmodule BlockScoutWeb.Mixfile do
1919
lockfile: "../../mix.lock",
2020
package: package(),
2121
start_permanent: Mix.env() == :prod,
22-
version: "10.0.6",
22+
version: "10.2.1",
2323
xref: [
2424
exclude: [
2525
Explorer.Chain.PolygonZkevm.Reader,

apps/ethereum_jsonrpc/mix.exs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ defmodule EthereumJSONRPC.MixProject do
1919
elixirc_paths: elixirc_paths(Mix.env()),
2020
lockfile: "../../mix.lock",
2121
start_permanent: Mix.env() == :prod,
22-
version: "10.0.6"
22+
version: "10.2.1"
2323
]
2424
end
2525

apps/explorer/mix.exs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ defmodule Explorer.Mixfile do
2020
lockfile: "../../mix.lock",
2121
package: package(),
2222
start_permanent: Mix.env() == :prod,
23-
version: "10.0.6",
23+
version: "10.2.1",
2424
xref: [exclude: [BlockScoutWeb.Routers.WebRouter.Helpers, Indexer.Helper, Indexer.Fetcher.InternalTransaction]]
2525
]
2626
end
@@ -111,7 +111,7 @@ defmodule Explorer.Mixfile do
111111
# `:spandex` tracing of `:ecto`
112112
{:spandex_ecto, "~> 0.7.0"},
113113
# Attach `:prometheus_ecto` to `:ecto`
114-
{:telemetry, "~> 1.4.1"},
114+
{:telemetry, "~> 1.3.0"},
115115
# `Timex.Duration` for `Explorer.Chain.Cache.Counters.AverageBlockTime.average_block_time/0`
116116
{:timex, "~> 3.7.1"},
117117
{:con_cache, "~> 1.0"},

apps/indexer/mix.exs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ defmodule Indexer.MixProject do
1414
elixirc_paths: elixirc_paths(Mix.env()),
1515
lockfile: "../../mix.lock",
1616
start_permanent: Mix.env() == :prod,
17-
version: "10.0.6",
17+
version: "10.2.1",
1818
xref: [
1919
exclude: [
2020
Explorer.Chain.Optimism.Deposit,

apps/nft_media_handler/mix.exs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ defmodule NFTMediaHandler.MixProject do
44
def project do
55
[
66
app: :nft_media_handler,
7-
version: "10.0.6",
7+
version: "10.2.1",
88
build_path: "../../_build",
99
config_path: "../../config/config.exs",
1010
deps_path: "../../deps",

apps/utils/mix.exs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ defmodule Utils.MixProject do
44
def project do
55
[
66
app: :utils,
7-
version: "10.0.6",
7+
version: "10.2.1",
88
build_path: "../../_build",
99
# config_path: "../../config/config.exs",
1010
deps_path: "../../deps",

docker/Makefile

Lines changed: 150 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,150 @@
1+
DOCKER_REPO := blockscout
2+
BACKEND_APP_NAME := blockscout
3+
FRONTEND_APP_NAME := frontend
4+
BACKEND_CONTAINER_IMAGE := $(DOCKER_REPO)/$(BACKEND_APP_NAME)
5+
BACKEND_CONTAINER_NAME := backend
6+
FRONTEND_CONTAINER_NAME := frontend
7+
VISUALIZER_CONTAINER_NAME := visualizer
8+
SIG_PROVIDER_CONTAINER_NAME := sig-provider
9+
STATS_CONTAINER_NAME := stats
10+
STATS_DB_CONTAINER_NAME := stats-db
11+
PROXY_CONTAINER_NAME := proxy
12+
PG_CONTAINER_NAME := postgres
13+
RELEASE_VERSION ?= '10.2.1'
14+
TAG := $(RELEASE_VERSION)-commit-$(shell git log -1 --pretty=format:"%h")
15+
STABLE_TAG := $(RELEASE_VERSION)
16+
17+
start:
18+
@echo "==> Starting blockscout db"
19+
@docker-compose -f ../docker-compose/services/db.yml up -d
20+
@echo "==> Starting blockscout backend"
21+
@docker-compose -f ../docker-compose/services/backend.yml up -d
22+
@echo "==> Starting stats microservice"
23+
@docker-compose -f ../docker-compose/services/stats.yml up -d
24+
@echo "==> Starting visualizer microservice"
25+
@docker-compose -f ../docker-compose/services/visualizer.yml up -d
26+
@echo "==> Starting sig-provider microservice"
27+
@docker-compose -f ../docker-compose/services/sig-provider.yml up -d
28+
@echo "==> Starting blockscout frontend"
29+
@docker-compose -f ../docker-compose/services/frontend.yml up -d
30+
@echo "==> Starting Nginx proxy"
31+
@docker-compose -f ../docker-compose/services/nginx.yml up -d
32+
33+
BS_BACKEND_STARTED := $(shell docker ps --no-trunc --filter name=^/${BACKEND_CONTAINER_NAME}$ | grep ${BACKEND_CONTAINER_NAME})
34+
BS_FRONTEND_STARTED := $(shell docker ps --no-trunc --filter name=^/${FRONTEND_CONTAINER_NAME}$ | grep ${FRONTEND_CONTAINER_NAME})
35+
BS_STATS_STARTED := $(shell docker ps --no-trunc --filter name=^/${STATS_CONTAINER_NAME}$ | grep ${STATS_CONTAINER_NAME})
36+
BS_STATS_DB_STARTED := $(shell docker ps --no-trunc --filter name=^/${STATS_DB_CONTAINER_NAME}$ | grep ${STATS_DB_CONTAINER_NAME})
37+
BS_VISUALIZER_STARTED := $(shell docker ps --no-trunc --filter name=^/${VISUALIZER_CONTAINER_NAME}$ | grep ${VISUALIZER_CONTAINER_NAME})
38+
BS_SIG_PROVIDER_STARTED := $(shell docker ps --no-trunc --filter name=^/${SIG_PROVIDER_CONTAINER_NAME}$ | grep ${SIG_PROVIDER_CONTAINER_NAME})
39+
BS_PROXY_STARTED := $(shell docker ps --no-trunc --filter name=^/${PROXY_CONTAINER_NAME}$ | grep ${PROXY_CONTAINER_NAME})
40+
stop:
41+
ifdef BS_FRONTEND_STARTED
42+
@echo "==> Stopping Blockscout frontend container."
43+
@docker stop $(FRONTEND_CONTAINER_NAME) && docker rm -f $(FRONTEND_CONTAINER_NAME)
44+
@echo "==> Blockscout frontend container stopped."
45+
else
46+
@echo "==> Blockscout frontend container already stopped before."
47+
endif
48+
ifdef BS_BACKEND_STARTED
49+
@echo "==> Stopping Blockscout backend container."
50+
@docker stop $(BACKEND_CONTAINER_NAME) && docker rm -f $(BACKEND_CONTAINER_NAME)
51+
@echo "==> Blockscout backend container stopped."
52+
else
53+
@echo "==> Blockscout backend container already stopped before."
54+
endif
55+
ifdef BS_STATS_DB_STARTED
56+
@echo "==> Stopping Blockscout stats db container."
57+
@docker stop $(STATS_DB_CONTAINER_NAME) && docker rm -f $(STATS_DB_CONTAINER_NAME)
58+
@echo "==> Blockscout stats db container stopped."
59+
else
60+
@echo "==> Blockscout stats db container already stopped before."
61+
endif
62+
ifdef BS_STATS_STARTED
63+
@echo "==> Stopping Blockscout stats container."
64+
@docker stop $(STATS_CONTAINER_NAME) && docker rm -f $(STATS_CONTAINER_NAME)
65+
@echo "==> Blockscout stats container stopped."
66+
else
67+
@echo "==> Blockscout stats container already stopped before."
68+
endif
69+
ifdef BS_VISUALIZER_STARTED
70+
@echo "==> Stopping Blockscout visualizer container."
71+
@docker stop $(VISUALIZER_CONTAINER_NAME) && docker rm -f $(VISUALIZER_CONTAINER_NAME)
72+
@echo "==> Blockscout visualizer container stopped."
73+
else
74+
@echo "==> Blockscout visualizer container already stopped before."
75+
endif
76+
ifdef BS_SIG_PROVIDER_STARTED
77+
@echo "==> Stopping Blockscout sig-provider container."
78+
@docker stop $(SIG_PROVIDER_CONTAINER_NAME) && docker rm -f $(SIG_PROVIDER_CONTAINER_NAME)
79+
@echo "==> Blockscout sig-provider container stopped."
80+
else
81+
@echo "==> Blockscout sig-provider container already stopped before."
82+
endif
83+
ifdef BS_PROXY_STARTED
84+
@echo "==> Stopping Nginx proxy container."
85+
@docker stop $(PROXY_CONTAINER_NAME) && docker rm -f $(PROXY_CONTAINER_NAME)
86+
@echo "==> Nginx proxy container stopped."
87+
else
88+
@echo "==> Nginx proxy container already stopped before."
89+
endif
90+
ifdef PG_STARTED
91+
@echo "==> Stopping Postgres container."
92+
@docker stop $(PG_CONTAINER_NAME)
93+
@echo "==> Postgres container stopped."
94+
else
95+
@echo "==> Postgres container already stopped before."
96+
endif
97+
98+
run: start
99+
100+
docker-login: ## login to DockerHub with credentials found in env
101+
docker login -u ${DOCKER_USERNAME} -p ${DOCKER_PASSWORD}
102+
103+
# Docker release - build, tag and push the container
104+
pre-release: build publish ## Make a release by building and publishing the `{version}` ans `latest` tagged containers to hub
105+
release: build publish-stable ## Make a release by building and publishing the `{version}` ans `latest` tagged containers to hub
106+
107+
# Docker publish
108+
publish: docker-login publish-latest publish-version ## publish the `{version}` ans `latest` tagged containers to hub
109+
publish-stable: docker-login publish-latest publish-stable-version ## publish the `{version}` ans `latest` tagged containers to hub
110+
111+
publish-latest: tag-latest ## publish the `latest` tagged container to hub
112+
@echo 'publish latest to $(DOCKER_REPO)'
113+
docker push $(BACKEND_CONTAINER_IMAGE):latest
114+
115+
publish-version: tag-version ## publish the `{version}` tagged container to hub
116+
@echo 'publish $(TAG) to $(DOCKER_REPO)'
117+
docker push $(BACKEND_CONTAINER_IMAGE):$(TAG)
118+
119+
publish-stable-version: tag-stable-version ## publish the `{version}` tagged container to hub
120+
@echo 'publish $(STABLE_TAG) to $(DOCKER_REPO)'
121+
docker push $(BACKEND_CONTAINER_IMAGE):$(STABLE_TAG)
122+
123+
# Docker tagging
124+
tag: tag-latest tag-version ## Generate container tags for the `{version}` ans `latest` tags
125+
tag-stable: tag-latest tag-stable-version ## Generate container tags for the `{version}` ans `latest` tags
126+
127+
tag-latest: ## Generate container `latest` tag
128+
@echo 'create latest tag'
129+
docker tag $(BACKEND_CONTAINER_IMAGE) $(BACKEND_CONTAINER_IMAGE):latest
130+
131+
tag-version: ## Generate container `{version}` tag
132+
@echo 'create tag $(TAG)'
133+
docker tag $(BACKEND_CONTAINER_IMAGE) $(BACKEND_CONTAINER_IMAGE):$(TAG)
134+
135+
tag-stable-version: ## Generate container `{version}` tag
136+
@echo 'create tag $(STABLE_TAG)'
137+
docker tag $(BACKEND_CONTAINER_IMAGE) $(BACKEND_CONTAINER_IMAGE):$(STABLE_TAG)
138+
139+
.PHONY: build \
140+
start \
141+
stop \
142+
run \
143+
docker-login \
144+
release \
145+
publish \
146+
publish-latest \
147+
publish-version \
148+
tag \
149+
tag-latest \
150+
tag-version

mix.exs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ defmodule BlockScout.Mixfile do
77
[
88
# app: :block_scout,
99
# aliases: aliases(config_env()),
10-
version: "10.0.6",
10+
version: "10.2.1",
1111
apps_path: "apps",
1212
deps: deps(),
1313
dialyzer: dialyzer(),

rel/config.exs

Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
import Config
2+
3+
# Import all plugins from `rel/plugins`
4+
# They can then be used by adding `plugin MyPlugin` to
5+
# either an environment, or release definition, where
6+
# `MyPlugin` is the name of the plugin module.
7+
~w(rel plugins *.exs)
8+
|> Path.join()
9+
|> Path.wildcard()
10+
|> Enum.map(&Code.eval_file(&1))
11+
12+
defer = fn fun ->
13+
apply(fun, [])
14+
end
15+
16+
app_root = fn ->
17+
if String.contains?(File.cwd!(), "apps") do
18+
Path.join([File.cwd!(), "/../../"])
19+
else
20+
File.cwd!()
21+
end
22+
end
23+
24+
cookie =
25+
defer.(fn ->
26+
cookie_bytes =
27+
:crypto.strong_rand_bytes(32)
28+
|> Base.encode32()
29+
30+
:ok = File.write!(Path.join(app_root.(), ".erlang_cookie"), cookie_bytes)
31+
:erlang.binary_to_atom(cookie_bytes, :utf8)
32+
end)
33+
34+
use Mix.Releases.Config,
35+
# This sets the default release built by `mix release`
36+
default_release: :default,
37+
# This sets the default environment used by `mix release`
38+
default_environment: config_env()
39+
40+
# For a full list of config options for both releases
41+
# and environments, visit https://hexdocs.pm/distillery/config/distillery.html
42+
43+
44+
# You may define one or more environments in this file,
45+
# an environment's settings will override those of a release
46+
# when building in that environment, this combination of release
47+
# and environment configuration is called a profile
48+
49+
environment :dev do
50+
# If you are running Phoenix, you should make sure that
51+
# server: true is set and the code reloader is disabled,
52+
# even in dev mode.
53+
# It is recommended that you build with MIX_ENV=prod and pass
54+
# the --env flag to Distillery explicitly if you want to use
55+
# dev mode.
56+
set dev_mode: true
57+
set include_erts: false
58+
set cookie: :"i6E,!mJ6|E&|.VPaDywo@N.o}BgmC$UdKXW[aK,(@U0Asfpp/NergA;CR%YW4;i6"
59+
end
60+
61+
environment :prod do
62+
set include_erts: true
63+
set include_src: false
64+
set cookie: cookie
65+
set vm_args: "rel/vm.args"
66+
end
67+
68+
# You may define one or more releases in this file.
69+
# If you have not set a default release, or selected one
70+
# when running `mix release`, the first release in the file
71+
# will be used by default
72+
73+
release :blockscout do
74+
set version: "10.2.1"
75+
set applications: [
76+
:runtime_tools,
77+
block_scout_web: :permanent,
78+
ethereum_jsonrpc: :permanent,
79+
explorer: :permanent,
80+
indexer: :permanent
81+
]
82+
set commands: [
83+
migrate: "rel/commands/migrate.sh",
84+
seed: "rel/commands/seed.sh",
85+
]
86+
end

0 commit comments

Comments
 (0)