This is the backend service for the Seo Guides application. It is built with Java 21, Spring Boot 3.5, and PostgreSQL.
- Java 21+
- Maven 4+
- Docker & Docker Compose (optional, for local dev DB)
- Git
git clone https://github.com/SEO-RnD/backend.git
cd backendmvn clean installThis will:
- Compile the code
- Run unit/integration tests
- Package a runnable JAR into
target/backend-0.0.1-SNAPSHOT.jar
A local PostgreSQL + pgAdmin environment is provided via Docker Compose.
docker compose up -dYou can run the application directly from Maven:
mvn spring-boot:runBy default, it will try to connect to a PostgreSQL database. For testing without PostgreSQL, configure H2 or disable Flyway.
- Database:
jdbc:postgresql://db:5432/seo_guides - Username:
seo - Password:
seo - PgAdmin: http://localhost:8081 (admin@local / admin)
First build the JAR:
mvn clean package -DskipTestsThen build the Docker image:
docker build . -f Dockerfile.prod -t backend:prod .A local PostgreSQL + pgAdmin environment is provided via Docker Compose.
docker compose up -dRun the backend
docker run -d --name seo-guides-app\
--network "$NET" \
-p 8080:8080 \
-e SPRING_PROFILES_ACTIVE=prod \
-e SPRING_DATASOURCE_URL='jdbc:postgresql://db:5432/seo_guides' \
-e SPRING_DATASOURCE_USERNAME=seo \
-e SPRING_DATASOURCE_PASSWORD=seo \
-e SPRING_JPA_HIBERNATE_DDL_AUTO=none \
-e SPRING_FLYWAY_ENABLED=false \
backend:prodCommon endpoints (depending on configuration):
- Health check:
http://localhost:8080/actuator/health
mvn testTests include health checks and integration tests.