Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1479827612 | ||
|
|
b3f09d5dfc | ||
|
|
4c83f6670d | ||
|
|
d9e69e03ad | ||
|
|
c1c326aa5d | ||
|
|
c26ee4f400 |
@@ -147,3 +147,11 @@ jobs:
|
||||
build-args: |
|
||||
VITE_APP_VERSION=${{ steps.generate.outputs.new_tag }}
|
||||
VITE_BASE_URL=https://todo.almazlar.com/api
|
||||
|
||||
- name: Deploy to Dokploy (Backend)
|
||||
run: |
|
||||
curl -X POST "${{ secrets.DOKPLOY_BACKEND_WEBHOOK_URL }}"
|
||||
|
||||
- name: Deploy to Dokploy (Frontend)
|
||||
run: |
|
||||
curl -X POST "${{ secrets.DOKPLOY_FRONTEND_WEBHOOK_URL }}"
|
||||
10
CHANGELOG.md
10
CHANGELOG.md
@@ -1,3 +1,13 @@
|
||||
## [v0.0.10] - 2026-02-22
|
||||
|
||||
* feat: add deployment steps for Backend and Frontend to Dokploy (b3f09d5)
|
||||
* fix: update VITE_BASE_URL to use port 8080 in Dockerfile (4c83f66)
|
||||
* fix: update server port to 8080 in Dockerfile and application properties (d9e69e0)
|
||||
|
||||
## [v0.0.9] - 2026-02-22
|
||||
|
||||
* feat: add createdAt field to Todo entity and update database migration script (c26ee4f)
|
||||
|
||||
## [v0.0.8] - 2026-02-22
|
||||
|
||||
* fix: update Dockerfile, application properties, and controller mappings for health check and CORS support (386f513)
|
||||
|
||||
@@ -16,6 +16,10 @@ RUN apt-get update && \
|
||||
apt-get install -y curl && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
|
||||
COPY --from=build /app/target/*.jar app.jar
|
||||
EXPOSE 8082
|
||||
EXPOSE 8080
|
||||
ENTRYPOINT ["java", "-jar", "app.jar"]
|
||||
|
||||
HEALTHCHECK --interval=30s --timeout=3s \
|
||||
CMD curl -f http://localhost:8080/api/actuator/health || exit 1
|
||||
@@ -1,5 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
@@ -69,8 +70,19 @@
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-actuator</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-flyway</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.flywaydb</groupId>
|
||||
<artifactId>flyway-core</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.flywaydb</groupId>
|
||||
<artifactId>flyway-database-postgresql</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package com.todo.backend.model;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import jakarta.persistence.*;
|
||||
|
||||
@Entity
|
||||
@@ -19,6 +21,9 @@ public class Todo {
|
||||
@Column(nullable = false)
|
||||
private boolean completed = false;
|
||||
|
||||
@Column(nullable = false, updatable = false)
|
||||
private LocalDateTime createdAt = LocalDateTime.now();
|
||||
|
||||
// Default constructor is required by JPA
|
||||
public Todo() {
|
||||
}
|
||||
@@ -62,4 +67,9 @@ public class Todo {
|
||||
public void setCompleted(boolean completed) {
|
||||
this.completed = completed;
|
||||
}
|
||||
|
||||
public LocalDateTime getCreatedAt() {
|
||||
return createdAt;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,10 +1,14 @@
|
||||
# backend/src/main/resources/application.properties
|
||||
|
||||
server.port=8082
|
||||
server.port=8080
|
||||
server.servlet.context-path=/api
|
||||
spring.application.name=backend
|
||||
|
||||
spring.jpa.hibernate.ddl-auto=update
|
||||
# Flyway
|
||||
spring.flyway.enabled=true
|
||||
spring.flyway.locations=classpath:db/migration
|
||||
spring.flyway.baseline-on-migrate=true
|
||||
|
||||
# Database
|
||||
spring.jpa.hibernate.ddl-auto=none
|
||||
spring.jpa.show-sql=true
|
||||
spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.PostgreSQLDialect
|
||||
management.endpoints.web.exposure.include=health,info,metrics
|
||||
|
||||
7
backend/src/main/resources/db/migration/V1__init.sql
Normal file
7
backend/src/main/resources/db/migration/V1__init.sql
Normal file
@@ -0,0 +1,7 @@
|
||||
CREATE TABLE todos (
|
||||
id BIGSERIAL PRIMARY KEY,
|
||||
title VARCHAR(255) NOT NULL,
|
||||
description TEXT,
|
||||
completed BOOLEAN NOT NULL DEFAULT FALSE,
|
||||
created_at TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT NOW()
|
||||
);
|
||||
@@ -7,7 +7,7 @@ COPY . .
|
||||
ARG VITE_APP_VERSION=dev
|
||||
ENV VITE_APP_VERSION=${VITE_APP_VERSION}
|
||||
|
||||
ARG VITE_BASE_URL=http://localhost:8082/api
|
||||
ARG VITE_BASE_URL=http://localhost:8080/api
|
||||
ENV VITE_BASE_URL=${VITE_BASE_URL}
|
||||
|
||||
RUN npm run build
|
||||
|
||||
Reference in New Issue
Block a user