This is the backend of Artefato application.
Note
|
This project use Spring Boot and Neo4j database to create an social network |
These are the components of our Web Application:
-
Application Type: Spring-Boot Java Web Application
-
Web framework: Spring-Boot enabled Spring-WebMVC
-
Persistence Access: Spring-Data-Neo4j
-
Database: Neo4j-Server
Environment variable name | Default value (or N/A) |
---|---|
PORT |
8080 |
NEO4J_URI |
bolt://localhost:7687 |
NEO4J_USER |
neo4j |
NEO4J_PASSWORD |
toor |
NEO4J_DATABASE |
neo4j |
NEO4J_VERSION |
4.3.5 |
First you have to clone the project on github https://github.com/dmax101/artefato-backend.git. After that you have to go to the folder of project and execute the Maven command to create a package.
.\mvnw clean package
After that you have to create a image of the application:
docker build --pull --rm -f "Dockerfile" -t artefato:latest "."
That’s it! the image is ready to go.
Now you have to create the containers of the application. and to do that you have to execute the follow command:
docker-compose -f "docker-compose.yml" up -d --build
Note
|
It’s important you change the volume in Neo4j container to persist your data. |
version: "3.9" services: neo4j: image: "neo4j" ports: - "7474:7474" - "7687:7687" volumes: - [PATH_TO]/neo4j/data:/data artefato: image: "danribeiro/artefato" ports: - "8080:8080" depends_on: - "neo4j" environment: - "SPRING_NEO4J_URI=bolt://neo4j:7687"
To access the api documentation of endpoints, access in the browser this link.