Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 41 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@

services:
mysql:
image: mysql:8.0
container_name: recipe-demo-mysql
environment:
MYSQL_ROOT_PASSWORD: db_password
MYSQL_DATABASE: recipe-demo
MYSQL_USER: db_username
MYSQL_PASSWORD: db_password
ports:
- "3306:3306"
volumes:
- mysql_data:/var/lib/mysql
healthcheck:
test: ["CMD", "mysqladmin", "ping", "-h", "localhost"]
interval: 10s
timeout: 5s
retries: 5

recipe-app:
build:
context: .
dockerfile: Dockerfile
container_name: recipe-demo-app
depends_on:
mysql:
condition: service_healthy
ports:
- "8443:8443"
environment:
- SPRING_DATASOURCE_URL=jdbc:mysql://mysql:3306/recipe-demo
- SPRING_DATASOURCE_USERNAME=db_username
- SPRING_DATASOURCE_PASSWORD=db_password
- APP_SECRET_KEY=your_secret_key
- APP_FRONTEND_URL=http://localhost:5173
volumes:
- ./keystore.p12:/app/keystore.p12

volumes:
mysql_data:
10 changes: 8 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>3.4.2</version>
<version>3.4.5</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<groupId>com.cwa</groupId>
Expand All @@ -27,7 +27,7 @@
<url/>
</scm>
<properties>
<java.version>17</java.version>
<java.version>24</java.version>
</properties>
<dependencies>
<dependency>
Expand All @@ -49,6 +49,11 @@
<artifactId>lombok</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>io.swagger.core.v3</groupId>
<artifactId>swagger-annotations</artifactId>
<version>2.2.30</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
Expand Down Expand Up @@ -119,3 +124,4 @@
</build>

</project>

6 changes: 3 additions & 3 deletions src/main/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,13 @@ logging:

app:
frontend-url: http://localhost:5173
secret-key: your_secret_key
secret-key: 2Om+oLWjsmVB17belDyJMHxvfPcjP6yglLYYmOHzSeQ=
expiration-time: 86400000

server:
port: 8443
ssl:
key-store: classpath:keystore.p12
key-store-password: password
key-store-password: recipe
key-store-type: PKCS12
key-alias: your_alias
key-alias: lokalhost
Binary file added src/main/resources/keystore.p12
Binary file not shown.