mirego / accent

The first developer-oriented translation tool. True asynchronous flow between translators and your team.
https://www.accent.reviews
BSD 3-Clause "New" or "Revised" License
1.29k stars 97 forks source link

docker-compose up fails with ** (ArgumentError) could not call Module #411

Closed tarasrudyy closed 9 months ago

tarasrudyy commented 9 months ago

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

simonprev commented 9 months ago

This is because we don’t build linux/arm64 on docker hub. See https://github.com/mirego/accent/pull/377

If you make build the app locally on your M1 Pro it will work. The steps are listed in the README:

  1. Run make build to build the OTP release with Docker
  2. Run make dev-start-postgresql to start an instance of Postgresql. The instance will run on port 5432 with the postgres user. You can change those values in the docker-compose.yml file.
  3. 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 in docker-compose.yml)
tarasrudyy commented 9 months ago

Many thanks! Local build works.