new command: make admins

This commit is contained in:
André Menrath 2023-12-20 14:23:40 +01:00
parent 9137341a8a
commit 6bed0fe088
2 changed files with 17 additions and 4 deletions

View file

@ -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

View file

@ -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