2018-12-17 11:24:26 +01:00
|
|
|
init:
|
2021-10-19 06:10:10 +02:00
|
|
|
@bash docker/message.sh "Start"
|
2018-12-17 11:24:26 +01:00
|
|
|
make start
|
|
|
|
|
2021-08-04 11:50:32 +02:00
|
|
|
setup: stop
|
|
|
|
@bash docker/message.sh "Compiling everything"
|
2023-11-14 17:24:42 +01:00
|
|
|
docker-compose run --rm api bash -c 'mix deps.get; npm ci; npm run build:pictures; mix ecto.create; mix ecto.migrate'
|
2021-08-04 11:50:32 +02:00
|
|
|
migrate:
|
|
|
|
docker-compose run --rm api mix ecto.migrate
|
|
|
|
logs:
|
|
|
|
docker-compose logs -f
|
2018-12-17 11:24:26 +01:00
|
|
|
start: stop
|
2021-10-19 06:10:10 +02:00
|
|
|
@bash docker/message.sh "Starting Mobilizon with Docker"
|
2019-10-16 11:12:42 +02:00
|
|
|
docker-compose up -d api
|
2021-10-19 06:10:10 +02:00
|
|
|
@bash docker/message.sh "Docker server started"
|
2018-12-17 11:24:26 +01:00
|
|
|
stop:
|
2021-10-19 06:10:10 +02:00
|
|
|
@bash docker/message.sh "Stopping Mobilizon"
|
2018-12-17 11:24:26 +01:00
|
|
|
docker-compose down
|
2021-10-19 06:10:10 +02:00
|
|
|
@bash docker/message.sh "Mobilizon is stopped"
|
2019-04-17 17:17:27 +02:00
|
|
|
test: stop
|
|
|
|
@bash docker/message.sh "Running tests"
|
2023-11-15 16:36:23 +01:00
|
|
|
docker-compose -f docker-compose.yml -f docker-compose.test.yml run api mix prepare_test
|
2021-10-19 06:10:10 +02:00
|
|
|
docker-compose -f docker-compose.yml -f docker-compose.test.yml run api mix test $(only)
|
|
|
|
@bash docker/message.sh "Done running tests"
|
2021-10-19 09:50:24 +02:00
|
|
|
format:
|
|
|
|
docker-compose run --rm api bash -c "mix format && mix credo --strict"
|
|
|
|
@bash docker/message.sh "Code is now ready to commit :)"
|
2018-12-17 11:24:26 +01:00
|
|
|
target: init
|