hey @stu @taylordowns2000 I am running lightning on an M3 pro chip via docker compose?
I am getting an error no matching manifest for linux/arm64/v8 in the manifest list entries which i suppress by specifying platform: linux/x86_64/v8 in docker compose.
Do you know about this, is there a better fix
Also this results in a scenario of the web failing to start. Could this be caused by poor performance of the AMD64 image i am using?
Log:
09:03:24.944 [notice] Application lightning exited: Lightning.Application.start(:normal, [:timex]) returned an error: shutdown: failed to start child: Cachex
** (EXIT) an exception was raised:
** (MatchError) no match of right hand side value: {:error, {:shutdown, {:failed_to_start_child, Cachex.Services.Incubator, {:shutdown, {:failed_to_start_child, Lightning.AuthProviders.CacheWarmer, {%Postgrex.Error{message: nil, postgres: %{code: :undefined_table, line: "1360", message: "relation \"public.auth_providers\" does not exist", position: "142", file: "parse_relation.c", unknown: "ERROR", severity: "ERROR", pg_code: "42P01", routine: "parserOpenTable"}, connection_id: 66, query: "SELECT a0.\"id\", a0.\"name\", a0.\"client_id\", a0.\"client_secret\", a0.\"discovery_url\", a0.\"redirect_uri\", a0.\"inserted_at\", a0.\"updated_at\" FROM \"public\".\"auth_providers\" AS a0"}, [{Ecto.Adapters.SQL, :raise_sql_call_error, 1, [file: ~c"lib/ecto/adapters/sql.ex", line: 1054, error_info: %{module: Exception}]}, {Ecto.Adapters.SQL, :execute, 6, [file: ~c"lib/ecto/adapters/sql.ex", line: 952]}, {Ecto.Repo.Queryable, :execute, 4, [file: ~c"lib/ecto/repo/queryable.ex", line: 232]}, {Ecto.Repo.Queryable, :all, 3, [file: ~c"lib/ecto/repo/queryable.ex", line: 19]}, {Ecto.Repo.Queryable, :one, 3, [file: ~c"lib/ecto/repo/queryable.ex", line: 154]}, {Lightning.AuthProviders.CacheWarmer, :execute, 1, [file: ~c"lib/lightning/auth_providers/cache_warmer.ex", line: 24]}, {Lightning.AuthProviders.CacheWarmer, :handle_info, 2, [file: ~c"deps/cachex/lib/cachex/warmer.ex", line: 95]}, {Lightning.AuthProviders.CacheWarmer, :init, 1, [file: ~c"deps/cachex/lib/cachex/warmer.ex", line: 79]}]}}}}}}
(cachex 3.6.0) lib/cachex.ex:301: Cachex.start_link/1
(stdlib 5.2.3) supervisor.erl:420: :supervisor.do_start_child_i/3
(stdlib 5.2.3) supervisor.erl:406: :supervisor.do_start_child/2
(stdlib 5.2.3) supervisor.erl:390: anonymous fn/3 in :supervisor.start_children/2
(stdlib 5.2.3) supervisor.erl:1258: :supervisor.children_map/4
(stdlib 5.2.3) supervisor.erl:350: :supervisor.init_children/2
(stdlib 5.2.3) gen_server.erl:980: :gen_server.init_it/2
(stdlib 5.2.3) gen_server.erl:935: :gen_server.init_it/6
Runtime terminating during boot (terminating)
My docker-compose file:
postgres:
platform: linux/x86_64/v8
deploy:
resources:
limits:
cpus: '${DOCKER_POSTGRES_CPUS:-0}'
memory: '${DOCKER_POSTGRES_MEMORY:-0}'
env_file:
- 'OpenFn/openfn.env'
image: 'postgres:14.2-alpine'
restart: '${DOCKER_RESTART_POLICY:-unless-stopped}'
stop_grace_period: '3s'
volumes:
- 'postgres:/var/lib/postgresql/data'
web:
platform: linux/x86_64/v8
image: 'openfn/lightning:latest'
deploy:
resources:
limits:
cpus: '${DOCKER_WEB_CPUS:-0}'
memory: '${DOCKER_WEB_MEMORY:-0}'
env_file:
- 'OpenFn/openfn.env'
depends_on:
- postgres
healthcheck:
test: '${DOCKER_WEB_HEALTHCHECK_TEST:-curl localhost:4000/health_check}'
interval: '10s'
timeout: '3s'
start_period: '5s'
retries: 3
ports:
- '${LIGHTNING_EXTERNAL_PORT:-127.0.0.1:${PORT:-4000}}:${URL_PORT:-4000}'
worker:
platform: linux/x86_64/v8
image: 'openfn/ws-worker:latest'
deploy:
resources:
limits:
cpus: '${DOCKER_WORKER_CPUS:-0}'
memory: '${DOCKER_WEB_MEMORY:-0}'
depends_on:
web:
condition: service_healthy
restart: true
env_file:
- 'OpenFn/openfn.env'
command:
['pnpm', 'start:prod', '-l', 'ws://web:${URL_PORT:-4000}/worker']
restart: '${DOCKER_RESTART_POLICY:-unless-stopped}'
stop_grace_period: '3s'
expose:
- '2222'
