Compare commits

..

No commits in common. "1636039545bd86d3d03d67c7527be049e449351f" and "06539a05fcf32c541d159d813ac345da367323ef" have entirely different histories.

5 changed files with 26 additions and 59 deletions

View File

@ -1,6 +0,0 @@
DB_NAME=EXAMPLE_DB
DB_USER=EXAMPLE
DB_PASSWORD=SECRET
DB_HOST=127.0.0.1
DB_PORT=5432
SPRING_PROFILES_ACTIVE=dev

2
.gitignore vendored
View File

@ -2,7 +2,5 @@
*.toml
*.db
target
logs
.env
Icon?

View File

@ -1,10 +0,0 @@
FROM maven:3.9-eclipse-temurin-21-alpine AS build
WORKDIR /app
COPY . .
RUN mvn clean package -DskipTests
FROM openjdk:21-jdk
WORKDIR /app
COPY --from=build /app/bootstrap/target/*.jar app.jar
EXPOSE 8080
ENTRYPOINT ["java","-jar","app.jar"]

View File

@ -32,7 +32,6 @@ server:
servlet:
context-path: /api
forward-headers-strategy: framework
---
spring:
@ -41,12 +40,32 @@ spring:
on-profile: default
datasource:
url: jdbc:postgresql://${DB_HOST:localhost}:${DB_PORT:5432}/${DB_NAME:default_db}
username: ${DB_USER:postgres}
password: ${DB_PASSWORD:postgres}
driver-class-name: org.postgresql.Driver
url: jdbc:h2:file:./restemailbridge-db
driver-class-name: org.h2.Driver
username: sa
password:
jpa:
properties:
hibernate:
ddl-auto: update
dialect: org.hibernate.dialect.PostgreSQLDialect
dialect: org.hibernate.dialect.H2Dialect
h2:
console:
enabled: true
path: /h2-console
---
spring:
config:
activate:
on-profile: prod
datasource:
url: jdbc:postgresql://${DB_HOST:localhost}:${DB_PORT:5432}/${DB_NAME:portfolio}
username: ${DB_USER:postgres}
password: ${DB_PASSWORD:postgres}
driver-class-name: org.postgresql.Driver
jpa:
hibernate:
ddl-auto: update

View File

@ -1,34 +0,0 @@
services:
api:
build: .
ports:
- "8080:8080"
depends_on:
- db
environment:
DB_NAME: ${DB_NAME}
DB_HOST: ${DB_HOST}
DB_PORT: ${DB_PORT}
DB_USER: ${DB_USER}
DB_PASSWORD: ${DB_PASSWORD}
networks:
- network
db:
image: postgres:15
ports:
- "5432:5432"
environment:
POSTGRES_DB: ${DB_NAME}
POSTGRES_USER: ${DB_USER}
POSTGRES_PASSWORD: ${DB_PASSWORD}
volumes:
- rest-email-bridge-db-data:/var/lib/postgresql/data
networks:
- network
volumes:
rest-email-bridge-db-data:
networks:
network:
driver: bridge