diff --git a/Makefile b/Makefile new file mode 100644 index 000000000..20eff2aa1 --- /dev/null +++ b/Makefile @@ -0,0 +1,14 @@ +init: + @bash docker/message.sh "start" + make start + +start: stop + @bash docker/message.sh "starting MobiliZon with docker" + docker-compose up -d + @bash docker/message.sh "started" +stop: + @bash docker/message.sh "stopping MobiliZon" + docker-compose down + @bash docker/message.sh "stopped" + +target: init diff --git a/README.md b/README.md index ceae4ec50..d83669d14 100644 --- a/README.md +++ b/README.md @@ -3,12 +3,17 @@ Your federated organization and mobilization platform. Gather people with a convivial, ethical, and emancipating tool. ## Development - +Clone the repo, and start the project via Docker +```bash +git clone https://framagit.org/framasoft/mobilizon +make +``` ### Manual #### Server * Install dependencies: + * Elixir (and Erlang) by following the instructions at [https://elixir-lang.github.io/install.html](https://elixir-lang.github.io/install.html) * Fetch backend Elixir dependencies with `mix deps.get`. * PostgreSQL @@ -43,10 +48,19 @@ once the server is running: automatically reloaded on change. ### Docker +You need to install the latest supported [Docker](https://docs.docker.com/install/#supported-platforms) and [Docker-Compose](https://docs.docker.com/compose/install/) before using the Docker way of installing Mobilizon. -Just run `docker-compose up -d` to start a database container, an API container and the front-end dev container running on localhost. +Just run : +```bash +make start +``` +to start a database container, an API container and the front-end dev container running on localhost. ## Learn more * Official website: https://joinmobilizon.org/ * Source: https://framagit.org/framasoft/mobilizon + * Riot/Matrix: https://riot.im/app/#/room/#Mobilizon:matrix.org + * Mastodon: https://framapiaf.org/@mobilizon + * Forum: https://framacolibri.org/c/mobilizon/fr-francais + diff --git a/docker-compose.yml b/docker-compose.yml index df37c4d7d..62ad87280 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -17,7 +17,7 @@ services: volumes: - './js:/app/js' ports: - - "80:8080" + - "8888:8080" entrypoint: entrypoint api: @@ -31,6 +31,7 @@ services: depends_on: - postgres environment: + MIX_ENV: dev POSTGRES_PASSWORD: postgres POSTGRES_USER: postgres POSTGRES_DATABASE: mobilizon_dev diff --git a/docker/message.sh b/docker/message.sh new file mode 100644 index 000000000..0a34aad73 --- /dev/null +++ b/docker/message.sh @@ -0,0 +1,7 @@ +#!/bin/bash + + GREEN='\033[0;32m' + NC='\033[0m' # No Color + echo -e "${GREEN}########################${NC}" + echo -e "${GREEN} ${1} ${NC}" + echo -e "${GREEN}########################${NC}" diff --git a/js/package.json b/js/package.json index 5216511e3..e51c93b83 100644 --- a/js/package.json +++ b/js/package.json @@ -2,8 +2,8 @@ "name": "mobilizon", "version": "0.1.0", "private": true, - "engines" : { - "node" : ">=10.0.0" + "engines": { + "node": ">=10.0.0" }, "scripts": { "dev": "vue-cli-service serve",