Docker Support Added

This commit is contained in:
{IndexZero} 2025-02-15 16:15:23 +03:00
parent b66567406a
commit cca9477034
3 changed files with 21 additions and 1 deletions

5
docker/Dockerfile Normal file
View File

@ -0,0 +1,5 @@
FROM eclipse-temurin:21
LABEL authors="indx"
COPY ./build/libs/NTO-Finals-0.0.1-SNAPSHOT.jar /opt/app/
CMD ["java", "-jar", "/opt/app/NTO-Finals-0.0.1-SNAPSHOT.jar"]

View File

@ -1,4 +1,19 @@
services:
app:
build:
context: ../
dockerfile: ./docker/Dockerfile
container_name: app
depends_on:
- postgres_nto
environment:
- SPRING_DATASOURCE_URL=jdbc:postgresql://postgres_nto:5432/application_db
- SPRING_DATASOURCE_USERNAME=$USERNAME
- SPRING_DATASOURCE_PASSWORD=$PASSWORD
ports:
- "8081:8081"
postgres_nto:
image: postgres:latest
container_name: postgres_nto

View File

@ -5,7 +5,7 @@ spring:
datasource:
url: jdbc:postgresql://localhost:5429/application_db
username: indexzero
password: gkl370WVUPMgLhK
password: PASSWORD
driver-class-name: org.postgresql.Driver
h2: