Skip to content
Snippets Groups Projects
Commit 63c5d972 authored by Hoai Viet Nguyen's avatar Hoai Viet Nguyen
Browse files

update configs

parent 08ac050e
Branches main
No related tags found
No related merge requests found
...@@ -29,6 +29,7 @@ dependencies { ...@@ -29,6 +29,7 @@ dependencies {
runtimeOnly 'com.h2database:h2' runtimeOnly 'com.h2database:h2'
testImplementation 'org.springframework.boot:spring-boot-starter-test' testImplementation 'org.springframework.boot:spring-boot-starter-test'
testImplementation 'org.jetbrains.kotlin:kotlin-test-junit5' testImplementation 'org.jetbrains.kotlin:kotlin-test-junit5'
runtimeOnly 'org.postgresql:postgresql'
testRuntimeOnly 'org.junit.platform:junit-platform-launcher' testRuntimeOnly 'org.junit.platform:junit-platform-launcher'
implementation 'org.json:json:20231013' implementation 'org.json:json:20231013'
} }
......
services:
nginx:
build: ./nginx
depends_on:
- springboot
ports:
- "9000:80"
postgres:
image: postgres:16-alpine
environment:
POSTGRES_DB: todo
POSTGRES_USER: user
POSTGRES_PASSWORD: password
volumes:
- postgres-data:/var/lib/postgresql/data
pgadmin:
image: elestio/pgadmin:latest
restart: always
environment:
- PGADMIN_DEFAULT_EMAIL=viet.nguyen@th-koeln.de
- PGADMIN_DEFAULT_PASSWORD=password
- PGADMIN_LISTEN_PORT=8080
ports:
- "9001:8080"
volumes:
- pgadmin-data:/var/lib/pgadmin
springboot:
build:
dockerfile: prod.Dockerfile
environment:
- SPRING_PROFILES_ACTIVE=prod
- SPRING_DATASOURCE_URL=jdbc:postgresql://postgres:5432/todo
- SPRING_DATASOURCE_USERNAME=user
- SPRING_DATASOURCE_PASSWORD=password
- SPRING_DATASOURCE_DRIVER_CLASS_NAME=org.postgresql.Driver
depends_on:
- postgres
volumes:
postgres-data:
pgadmin-data:
\ No newline at end of file
FROM nginx:stable-alpine
COPY nginx.conf /etc/nginx/conf.d/default.conf
\ No newline at end of file
server {
listen 80;
server_tokens off;
location / {
proxy_pass http://springboot:8080;
proxy_set_header Host $http_host;
}
}
\ No newline at end of file
FROM gradle:8.5.0-jdk17 AS build
COPY --chown=gradle:gradle . /home/gradle/src
WORKDIR /home/gradle/src
RUN gradle build --no-daemon
FROM eclipse-temurin:17-jre
EXPOSE 8080
RUN mkdir /app
COPY --from=build /home/gradle/src/build/libs/*.jar /app/spring-boot-application.jar
ENTRYPOINT ["java","-Dspring.profiles.active=prod","-jar","/app/spring-boot-application.jar"]
\ No newline at end of file
spring.datasource.driverClassName=org.postgresql.Driver
\ No newline at end of file
spring.application.name=fitamcampus spring.application.name=fitamcampus
#spring.datasource.url=jdbc:h2:mem:d64df7fe-ac80-4f94-b0a6-87e6bd6c204d
spring.datasource.url=jdbc:h2:file:./fitamcampusdb
spring.datasource.driverClassName=org.h2.Driver
spring.datasource.username=sa
spring.datasource.password=password
spring.jpa.hibernate.ddl-auto=update spring.jpa.hibernate.ddl-auto=update
spring.mvc.hiddenmethod.filter.enabled=true spring.mvc.hiddenmethod.filter.enabled=true
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
</head> </head>
<body> <body>
<header> <header>
Sporttreffen FitAmCampus B - Sporttreffen
</header> </header>
<hr> <hr>
<main> <main>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment