rslim087/profile-management
This Docker image provides an authentication microservice with user management functionality. It allows users to sign up, sign in, sign out, and update their profile information. It uses JSON Web Tokens (JWT) for authentication.
In version 2.0.0, the Authentication Microservice has been updated to include MySQL integration. It now relies on environment variables to establish a connection with a MySQL database for storing and retrieving user data.
docker run -p 3003:3003 -e MYSQL_HOST=<mysql_host> -e MYSQL_PORT=<mysql_port> -e MYSQL_USER=<mysql_user> -e MYSQL_PASSWORD=<mysql_password> -e MYSQL_DATABASE=<mysql_database> authentication-microservice
To run a container from this image, use the following command:
docker run -p 3003:3003 authentication-microservice
The microservice will be accessible at http://localhost:3003
.
POST /api/signup
: Sign up a new user.POST /api/signin
: Sign in an existing user.POST /api/signout
: Sign out the currently authenticated user.GET /api/protected
: Example of a protected route that requires authentication.PUT /api/update
: Update the profile information of the authenticated user.This microservice does not require any environment variables to be set.
This microservice does not use any volumes.
To enable communication between the Authentication microservice and other microservices or applications, ensure that the containers are connected to the same Docker network. You can achieve this by following these steps:
docker network create my-network
--network
flag:docker run --network my-network -p 3003:3003 authentication-microservice
docker run --network my-network -p 4000:4000 ecommerce-ui
By connecting the containers to the same Docker network, they can communicate with each other using their container names as hostnames.
If you want to build the Docker image yourself, follow these steps:
docker build -t authentication-microservice .
This command will build the Docker image using the provided Dockerfile and tag it as authentication-microservice
.
If you would like to contribute to this project, please follow the guidelines in the CONTRIBUTING.md file.
This project is licensed under the MIT License.
If you encounter any issues or have questions regarding this Docker image or the Authentication microservice, please open an issue on the GitHub repository.
docker pull rslim087/profile-management