Error during `make`, docker container isn't starting
Description
When I run 'make', there is an error and the API container doesn't start.
Steps to Reproduce
- make
Expected behaviour:
Container mobilizon_api should start
Actual behaviour:
There is an error during make, and mobilizon_api restarts every 10 seconds.
Reproduces how often:
Always
Versions
Commit 59caac86
Additional Information
Error when running make
:
johan@johan-W54-55-94-95-97AU-AUQ /media/johan/751801ca-a9ff-437b-aa64-b8299955a0c5/IdeaProjects/mobilizon $ make
########################
start
########################
make start
make[1] : on entre dans le répertoire « /media/johan/751801ca-a9ff-437b-aa64-b8299955a0c5/IdeaProjects/mobilizon »
########################
stopping Mobilizon
########################
docker-compose down
Removing network mobilizon_default
WARNING: Network mobilizon_default not found.
########################
stopped
########################
########################
starting Mobilizon with docker
########################
docker-compose up -d api
Creating network "mobilizon_default" with the default driver
Creating mobilizon_db ... done
Creating mobilizon_api ... done
docker-compose exec api sh -c "cd js && yarn install && cd ../"
Makefile:6 : la recette pour la cible « start » a échouée
make[1]: *** [start] Erreur 137
make[1] : on quitte le répertoire « /media/johan/751801ca-a9ff-437b-aa64-b8299955a0c5/IdeaProjects/mobilizon »
Makefile:2 : la recette pour la cible « init » a échouée
make: *** [init] Erreur 2
This is caused by the mobilizon_api continuously crashing and restarting because of missing dependencies: the command "mix phx.server" is run before the commands that install the dependencies in Makefile.
Container logs:
johan@johan-W54-55-94-95-97AU-AUQ /media/johan/751801ca-a9ff-437b-aa64-b8299955a0c5/IdeaProjects/mobilizon $ docker container logs mobilizon_api
[...]
* ex_optimizer (Hex package)
the dependency is not available, run "mix deps.get"
* http_signatures (https://git.pleroma.social/pleroma/http_signatures.git)
the dependency is not available, run "mix deps.get"
* ecto_autoslug_field (Hex package)
the dependency is not available, run "mix deps.get"
* absinthe_plug (Hex package)
the dependency is not available, run "mix deps.get"
* phoenix (Hex package)
the dependency is not available, run "mix deps.get"
* mix_test_watch (Hex package)
the dependency is not available, run "mix deps.get"
* postgrex (Hex package)
the dependency is not available, run "mix deps.get"
* plug_cowboy (Hex package)
the dependency is not available, run "mix deps.get"
* geo (Hex package)
the dependency is not available, run "mix deps.get"
* phoenix_ecto (Hex package)
the dependency is not available, run "mix deps.get"
** (Mix) Can't continue due to errors on dependencies
I have the same issue if I try to run docker-compose
manually:
johan@johan-W54-55-94-95-97AU-AUQ /media/johan/751801ca-a9ff-437b-aa64-b8299955a0c5/IdeaProjects/mobilizon_johan_fork $ docker-compose up -d api
Creating network "mobilizon_johan_fork_default" with the default driver
Creating mobilizon_db ... done
Creating mobilizon_api ... done
johan@johan-W54-55-94-95-97AU-AUQ /media/johan/751801ca-a9ff-437b-aa64-b8299955a0c5/IdeaProjects/mobilizon_johan_fork $ docker container ls
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
8ff288ad7456 mobilizon_johan_fork_api "mix phx.server" 8 seconds ago Restarting (1) 1 second ago mobilizon_api
aaa0d90e7d39 mdillon/postgis:11 "docker-entrypoint.s…" 10 seconds ago Up 7 seconds 5432/tcp mobilizon_db
johan@johan-W54-55-94-95-97AU-AUQ /media/johan/751801ca-a9ff-437b-aa64-b8299955a0c5/IdeaProjects/mobilizon_johan_fork $ docker-compose exec api sh -c "cd js && yarn install && cd ../"
Error response from daemon: Container 8ff288ad74565bb0773f9b5f8fb39ab62925c16ea0ca77c5d2579cc3013a8464 is restarting, wait until the container is running
Edited by JohanBaskovec