Sociahigh is a complete application developed using the concept of containerized microservices. This application includes a node
with fastify
and typescript
backend, a react
, tailwind
and typescript
frontend, nginx
as http server and a custom npm package
for use in the backend environment. Every microservice and the http server is containerized with docker
.
The purpose of the application is the management of small events, providing the management of guests, the items they are taking to the event and updating everyone about changes.
The first step after downloading the project is to create a docker network
docker network create \ --driver=bridge \ --subnet=171.1.0.0/16 \ sociahigh_network
Build all the Docker images in the root of the main projects
docker build -t sociahigh_user_microservice ./sociahigh_user_microservice
docker build -t sociahigh_event_microservice ./sociahigh_event_microservice
docker build -t sociahigh_nginx ./ sociahigh_nginx
Run the containers
docker run -d \ --name sociahigh_user_microservice \ --restart always \ -p 8800:8800 \ --ip 171.1.0.88 \ --network sociahigh_network \ sociahigh_user_microservice
docker run -d \ --name sociahigh_event_microservice \ --restart always \ -p 8900:8900 \ --ip 171.1.0.89 \ --network sociahigh_network \ sociahigh_event_microservice
docker run -d \ --name sociahigh_nginx \ --restart always \ -p 80:80 \ --ip 171.1.0.80 \ --network sociahigh_network \ sociahigh_nginx
The server will go up at port 80 and you can call every microservice using it routes through nginx. You can run a portainer server using the command below:
docker volume create portainer_data
docker run -d -p 8000:8000 -p 9443:9443 --name portainer --restart=always -v /var/run/docker.sock:/var/run/docker.sock -v portainer_data:/data portainer/portainer-ce:latest
Go to the `sociahigh_frontend_web` folder and run the script:
npm run dev
The server will go up at port 5173
A POSTMAN COLLECTION IS INCLUDED IN THE PROJECT. So, you can import this collection and have fun.
See some system screens below
The complete database structure:
Ítalo Sérvio |