2018-12-17 10:24:26 +00:00
|
|
|
init:
|
2021-10-19 04:10:10 +00:00
|
|
|
@bash docker/message.sh "Start"
|
2018-12-17 10:24:26 +00:00
|
|
|
make start
|
|
|
|
|
2021-08-04 09:50:32 +00:00
|
|
|
setup: stop
|
|
|
|
@bash docker/message.sh "Compiling everything"
|
2024-01-04 14:20:17 +00: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 09:50:32 +00:00
|
|
|
migrate:
|
2024-01-04 14:20:17 +00:00
|
|
|
docker compose run --rm api mix ecto.migrate
|
2021-08-04 09:50:32 +00:00
|
|
|
logs:
|
2024-01-04 14:20:17 +00:00
|
|
|
docker compose logs -f
|
2018-12-17 10:24:26 +00:00
|
|
|
start: stop
|
2021-10-19 04:10:10 +00:00
|
|
|
@bash docker/message.sh "Starting Mobilizon with Docker"
|
2024-01-04 14:20:17 +00:00
|
|
|
docker compose up -d api
|
2021-10-19 04:10:10 +00:00
|
|
|
@bash docker/message.sh "Docker server started"
|
2018-12-17 10:24:26 +00:00
|
|
|
stop:
|
2021-10-19 04:10:10 +00:00
|
|
|
@bash docker/message.sh "Stopping Mobilizon"
|
2024-01-04 14:20:17 +00:00
|
|
|
docker compose down
|
2021-10-19 04:10:10 +00:00
|
|
|
@bash docker/message.sh "Mobilizon is stopped"
|
2019-04-17 15:17:27 +00:00
|
|
|
test: stop
|
|
|
|
@bash docker/message.sh "Running tests"
|
2024-01-04 14:20:17 +00:00
|
|
|
docker compose -f docker compose.yml -f docker compose.test.yml run api mix prepare_test
|
|
|
|
docker compose -f docker compose.yml -f docker compose.test.yml run api mix test $(only)
|
2021-10-19 04:10:10 +00:00
|
|
|
@bash docker/message.sh "Done running tests"
|
2021-10-19 07:50:24 +00:00
|
|
|
format:
|
2024-01-04 14:20:17 +00:00
|
|
|
docker compose run --rm api bash -c "mix format && mix credo --strict"
|
2021-10-19 07:50:24 +00:00
|
|
|
@bash docker/message.sh "Code is now ready to commit :)"
|
2018-12-17 10:24:26 +00:00
|
|
|
target: init
|