Getting Started - VilnaCRM-Org/user-service GitHub Wiki
Welcome to the User Service, a modern PHP microservice for user management, including registration and authentication. This guide will help you set up the service, configure it, and quickly get started with its basic functionalities.
Installation Instructions
Prerequisites
Before you begin, ensure you have the following installed on your system:
- Docker 25.0.3+
- Docker Compose 2.24.5+
- Git 2.34.1+
CLI commands
As you will see, we use Make commands to manage the project. Run make help
after setting up User Service to see a list of all available commands.
Steps
-
Clone the Repository
We recommend using Linux to set up this service.
Then, start by cloning the repository to your local machine. Note, that the recommended way of doing it is using SSH. Check this link for more information.
git clone [email protected]:VilnaCRM-Org/user-service.git cd user-service
-
Configuration
Configuration is managed through environment variables. You can copy
.env
to.env.local
and customize the environment variables for local development. Here's an example configuration:DB_ROOT_PASSWORD=root DB_NAME=db DB_PORT=3306 DATABASE_URL="mysql://root:$DB_ROOT_PASSWORD@database:$DB_PORT/$DB_NAME"
-
Start the project
Use the make command to start the project. It will up the container, install dependencies, and run migrations to the DB.
make start
It will be better to wait a few minutes after this command executes, before moving further. You can run
make logs
to check the state of serviceThat's it! Now the service is ready for work.
-
Quick start guide
Once the service runs, you can check these local URLs for a list of available endpoints and detailed info about them.
-
FAQ
If something goes wrong, try executing this sequence of commands:
make fix-perms make cache-clear make install make doctrine-migrations-migrate
Learn more about Design and Architecture Documentation.