1
0
Fork 0
mirror of https://framagit.org/framasoft/mobilizon.git synced 2024-12-21 23:44:30 +00:00
mobilizon/Makefile
JohanBaskovec 010f56acf2 Fix error when running make / docker-compose up
This fixes an error when running the mobilizon_api container (either
with `make` or `docker-compose up`): the command `mix phx.server`
was run first in the mobilizon_api container, but it
made the container restart every ~10 seconds because of missing
dependencies errors. As a result it became impossible to install
the depencies using
`docker-compose exec api sh -c "cd js && yarn install && cd ../"`,
because that would give this error:
`Error response from daemon: Container
8ff288ad74565bb0773f9b5f8fb39ab62925c16ea0ca77c5d2579cc3013a8464 is
restarting, wait until the container is running`.

This commit fixes this error by running the dependency installation
commands (and compilation and db migration) before `mix phx.server`.
2019-10-22 22:16:18 +02:00

18 lines
479 B
Makefile

init:
@bash docker/message.sh "start"
make start
start: stop
@bash docker/message.sh "starting Mobilizon with docker"
docker-compose up -d api
@bash docker/message.sh "started"
stop:
@bash docker/message.sh "stopping Mobilizon"
docker-compose down
@bash docker/message.sh "stopped"
test: stop
@bash docker/message.sh "Running tests"
docker-compose -f docker-compose.yml -f docker-compose.test.yml run api mix test
@bash docker/message.sh "Tests runned"
target: init