The Alkemio platform is a micro-services architecture, which implies that typically multiple dependencies are needed to run the Server.
To simplify setting up the Server development environment, a pre-configured docker compose script is provided.
- Docker and docker-compose installed on x86 architecture (so not an ARM-based architecture like Raspberry pi or MacBook with M1 processor)
- ports available on localhost:
- 4000 (alkemio server),
- 3306 (MySQL database)
- 8888 (traefik dashobard)
- 3000 (alkemio client)
- 8008 (synapse server)
- 4436 (mailslurper UI)
- 4437 (mailslurper API)
- 5672 (rabbitMQ amqp)
- 15672 (rabbitMQ management UI)
- Register an alkemio profile for notifications and configure it via SERVICE_ACCOUNT_USERNAME & SERVICE_ACCOUNT_PASSWORD env variables in .env.docker. The profile needs to be Global Community Admin.
- Make sure you're using npm @8.5.5. node v16.15 is recommended (but it should work with v < 21)
- Start the services alkemio server is dependent on:
npm run start:services
- Run the migrations
npm run migration:run
- Start alkemio-server
npm start
- Validate that the server is running by visiting the graphql endpoint.
- The docker compose script puts the server listening on port 4001 - to avoid conflict with the default port that is used by local development.
- The server will be empty after initially being created. To populate the Server with some sample data please use the Alkemio Populator tool which allows easy population from a local file. Please remember to specify the correct port to connect to!
- In order to use matrix synapse server, run from the root folder:
- If you are using Windows you must go to docker settings -> resources -> file sharing and add the paths to .build and .scripts dirs.
sudo bash ./.scripts/bootstrap_synapse.sh
It will use the SYNAPSE_XXX from env.docker, create a configuration in /var/lib/docker/volumes/synapse-data/_data/, copy them to /var/docker_data/matrix and then map the latter to a volume used in docker-compose.
If you want to run a debug version of kratos, run:
npm run start:services:kratos:debug
If you want to run a debug version of any AI service (Engine), do the following:
- Clone the repo in the same root folder as the server
- Run the following command:
npm run start:services:ai:debug
Note: You may need multiple repositories cloned in order for this command to run. You can search the word build
in quickstart-services-ai-debug
and check which contexts are being built. If you need only one service to be built, comment the rest of the services which build the Dockerfile from relative path to the Alkemio Server.