All services started from a single repository
Keep in mind this repository is for local development only and is not meant to be deployed on any production environment!
- Clone the repository:
git clone https://github.com/joinmilo/dev --recursive milo.dev
-
Shared folders: We are using shared folders to enable live code reloading. Without this, Docker Compose will not start: - Windows/MacOS: Add the cloned
milo.dev
directory to Docker shared directories (Preferences -> Resources -> File sharing). - Windows/MacOS: Make sure that in Docker preferences you have dedicated at least 5 GB of memory (Preferences -> Resources -> Advanced). - Linux: No action required, sharing already enabled and memory for Docker engine is not limited. -
Go to the cloned directory:
cd milo.dev
- Copy the
.env
file from the example :
cp .env.example .env
-
In the .env file you will see the variable
MILO_LOCATION_KEY
. Ask forMILO_LOCATION_KEY
or create your own Bing Maps Key (see Bing Maps Integration) -
In the .env file you will see the variable
MILO_CAPTCHA_SECRET
. Ask forMILO_CAPTCHA_SECRET
or create your own hCaptcha secret (see hCaptcha docs) -
Ask for firebase-credentials.json or create your own Firebase credential file (see Firebase Docs)
-
Copy
firebase-credentials.json
to server:
cp /path/to/your/firebase-credentials.json server/src/main/resources/credentials/firebase-credentials.json
- Copy media files to server storage
mkdir server/.storage
cp -a media/. server/.storage
-
In order to have a local db running, ask for SQL dump and place it into
/db
-
Build the stack:
docker compose build --no-cache
- Run the application:
docker compose up
In case of server development you should run the server within the IDE and not within docker compose. In that case you can use the scale flag, e.g.:
docker compose up --scale server=0
After building and running the application following URLs are exposed:
- Client: http://localhost:8010
- Server: http://localhost:8011
- Database: http://localhost:8012
- Mail: http://localhost:8014
For testing the API you can reach the playground here: http://localhost:8011/gui
In order to retrieve any media content there are the following endpoints to retrieve them:
- http://localhost:8011/api/media/{id}: {id} should be replaced by the media id. This endpoint retrieves the item without downloading it immediately
- http://localhost:8011/api/media/download/{id}: {id} should be replaced by the media id. This endpoint retrieves the data and has header set to download it automatically.
The folder specs
contains the datamodel and is a Modelio project.
To open the project open Modelio and switch the workspace to specs
.
This repository contains newest stable versions. When new release appear, pull new version of this repository. In order to update all of them to their newest versions, run:
git submodule update --remote
During the development there might be changes in existing changelog files. Therefore the whole database need to be purged. To setup a clean database you have to purge the volume before starting the docker-comppose:
docker compose down -v