Merge branch 'docker-compose' into 'main'

build(docker): change docker-compose to docker compose in Makefile

See merge request framasoft/mobilizon!1522
This commit is contained in:
Thomas Citharel 2024-01-04 14:20:57 +00:00
commit 6178f5a76e

View file

@ -4,25 +4,25 @@ init:
setup: stop setup: stop
@bash docker/message.sh "Compiling everything" @bash docker/message.sh "Compiling everything"
docker-compose run --rm api bash -c 'mix deps.get; npm ci; npm run build:pictures; mix ecto.create; mix ecto.migrate' docker compose run --rm api bash -c 'mix deps.get; npm ci; npm run build:pictures; mix ecto.create; mix ecto.migrate'
migrate: migrate:
docker-compose run --rm api mix ecto.migrate docker compose run --rm api mix ecto.migrate
logs: logs:
docker-compose logs -f docker compose logs -f
start: stop start: stop
@bash docker/message.sh "Starting Mobilizon with Docker" @bash docker/message.sh "Starting Mobilizon with Docker"
docker-compose up -d api docker compose up -d api
@bash docker/message.sh "Docker server started" @bash docker/message.sh "Docker server started"
stop: stop:
@bash docker/message.sh "Stopping Mobilizon" @bash docker/message.sh "Stopping Mobilizon"
docker-compose down docker compose down
@bash docker/message.sh "Mobilizon is stopped" @bash docker/message.sh "Mobilizon is stopped"
test: stop test: stop
@bash docker/message.sh "Running tests" @bash docker/message.sh "Running tests"
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 prepare_test
docker-compose -f docker-compose.yml -f docker-compose.test.yml run api mix test $(only) docker compose -f docker compose.yml -f docker compose.test.yml run api mix test $(only)
@bash docker/message.sh "Done running tests" @bash docker/message.sh "Done running tests"
format: format:
docker-compose run --rm api bash -c "mix format && mix credo --strict" docker compose run --rm api bash -c "mix format && mix credo --strict"
@bash docker/message.sh "Code is now ready to commit :)" @bash docker/message.sh "Code is now ready to commit :)"
target: init target: init