Skip to content

Open source, privacy-first web analytics. Lightweight, cookie-free Google Analytics alternative. Self-hosted or cloud.

Fix dev environment startup errors (#1990)

Adam Rutkowski45cc1d27a162
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 5b8ab2f6aa..bd61e881c7 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -15,6 +15,7 @@ Make sure Docker, Elixir, Erlang and Node.js are all installed on your developme
2. Run `mix ecto.create`. This will create the required databases in both Postgres and Clickhouse.
3. Run `mix ecto.migrate` to build the database schema.
4. Run `npm ci --prefix assets` to install the required node dependencies.
+ 5. Run `mix download_country_database` to fetch geolocation database
3. Run `make server` or `mix phx.server` to start the Phoenix server.
4. The system is now available on `localhost:8000`.
diff --git a/Makefile b/Makefile
index 0c8d61e015..612c01e21d 100644
--- a/Makefile
+++ b/Makefile
@@ -1,7 +1,10 @@
+.PHONY: install server clickhouse clickhouse-arm clickhouse-stop postgres postgres-stop dummy_event
+
install:
mix deps.get
mix ecto.create
mix ecto.migrate
+ mix download_country_database
npm install --prefix assets
server:
diff --git a/config/runtime.exs b/config/runtime.exs
index 3eb09471ae..d6cd685926 100644
--- a/config/runtime.exs
+++ b/config/runtime.exs
@@ -114,7 +114,7 @@ geolite2_country_db =
get_var_from_path_or_env(
config_dir,
"GEOLITE2_COUNTRY_DB",
- Application.app_dir(:plausible) <> "/priv/geodb/dbip-city-lite-2022-05.mmdb"
+ Application.app_dir(:plausible, "/priv/geodb/dbip-country.mmdb")
)
ip_geolocation_db = get_var_from_path_or_env(config_dir, "IP_GEOLOCATION_DB", geolite2_country_db)
diff --git a/mix.exs b/mix.exs
index b465712050..14976e6347 100644
--- a/mix.exs
+++ b/mix.exs
@@ -36,7 +36,8 @@ defmodule Plausible.MixProject do
mod: {Plausible.Application, []},
extra_applications: [
:logger,
- :runtime_tools
+ :runtime_tools,
+ :tls_certificate_check
]
]
end