docker-compose up fails with ** (ArgumentError) could not call Module
Closed this issue · 2 comments
Apple M1 Pro / macOS 14.2.1 (23C71)
accent-postgres | 2024-02-07 13:16:08.837 UTC [1] LOG: database system is ready to accept connections
accent | Running migrations for accent…
accent | ** (ArgumentError) could not call Module.put_attribute/3 because the module Accent.Repo.Migrations.CreateLanguages is already compiled
accent | (elixir 1.15.7) lib/module.ex:2310: Module.assert_not_readonly!/2
accent | (elixir 1.15.7) lib/module.ex:2007: Module.put_attribute/5
accent | lib/accent-1.19.12/priv/repo/migrations/20150929150001_create_projects.exs:2: (module)
accent exited with code 1
This is because we don’t build linux/arm64
on docker hub. See #377
If you make build
the app locally on your M1 Pro it will work. The steps are listed in the README:
- Run
make build
to build the OTP release with Docker - Run
make dev-start-postgresql
to start an instance of Postgresql. The instance will run on port 5432 with thepostgres
user. You can change those values in thedocker-compose.yml
file. - Run
make dev-start-application
to start the app! The release hook of the release will execute migrations and seeds before starting the webserver on port 4000 (again you can change the settings indocker-compose.yml
)
Many thanks! Local build works.