From 6bed0fe088074e015faae0c1eac02657cb40ce23 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Menrath?= Date: Wed, 20 Dec 2023 14:23:40 +0100 Subject: [PATCH] new command: make admins --- Makefile | 17 +++++++++++++++-- README.md | 4 ++-- 2 files changed, 17 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 20e4c7c..f91ec9f 100644 --- a/Makefile +++ b/Makefile @@ -3,21 +3,34 @@ init: make start setup: stop - @bash mobilizon/mobilizon/docker/message.sh "Compiling everything" + @bash mobilizon/mobilizon/docker/message.sh "Mobilizon: Compiling everything" docker-compose run --rm mobilizon bash -c 'mix deps.get; npm ci; npm run build:pictures; mix ecto.create; mix ecto.migrate' + +admins: + docker-compose up -d + @bash mobilizon/mobilizon/docker/message.sh "Mobilizon: Create admin user" + docker-compose exec mobilizon mix mobilizon.users.new "your@email.com" --admin --password "password" + # @bash mobilizon/mobilizon/docker/message.sh "WordPress: Setup instance and creating admin user" + # @bash wordpress/setup.sh + build: stop - @bash mobilizon/mobilizon/docker/message.sh "Compiling backend" + @bash mobilizon/mobilizon/docker/message.sh "Mobilizon: Compiling backend" docker-compose run --rm mobilizon bash -c 'mix ecto.create' + migrate: docker-compose run --rm mobilizon mix ecto.migrate + logs: docker-compose logs -f + start: stop @bash mobilizon/mobilizon/docker/message.sh "Starting WordPress and Mobilizon with Docker" docker-compose up -d @bash mobilizon/mobilizon/docker/message.sh "Docker containers started" + stop: @bash mobilizon/mobilizon/docker/message.sh "Stopping WordPress and Mobilizon" docker-compose down @bash mobilizon/mobilizon/docker/message.sh "WordPress and Mobilizon are stopped" + target: init diff --git a/README.md b/README.md index 0c57ef9..ac0dada 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -This repository helps you to set up a local Mobilizon and a local WordPress instance for developing within minutes. +This repository helps you to set up a local Mobilizon and a local WordPress instance for developing within minutes. It is still early alpha, if you should try it and get stuck somewhere it most likely our fault, so please reach out to us and we try to help you. ## Step by Step Guide @@ -37,7 +37,7 @@ Currently this has to be done manually: ### 8. Create an administrator user for Mobilizon ``` -docker-compose exec mobilizon mix mobilizon.users.new "your@email.com" --admin --password "password" +make admins ``` ### 9. Start developing and debuggin