Skip to content
Merged
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
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ jobs:
cache-dependency-path: 'src/main/client/package-lock.json'

- name: 'Application :: Build'
run: ./mvnw clean package -DskipTests
run: ./mvnw clean package -Dspring-boot.run.profiles=prod -DskipTests=true

- name: List JAR files (for verification)
run: ls -la target/*.jar
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,5 @@ lint/
.vscode/

**DS_Store
/src/main/client/vite.config.d.ts
/src/main/client/vite.config.js
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ COPY target/*.jar app.jar
# Expose the port
EXPOSE 8080

ENTRYPOINT ["java","-jar","-Dimage.upload.directory=/app/uploads", "app.jar"]
ENTRYPOINT ["java","-jar","-Dspring.profiles.active=prod", "-Dimage.upload.directory=/app/uploads", "app.jar"]
7 changes: 5 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
.PHONY: lint ui server all

lint:
mvn exec:java -Dexec.mainClass="com.puppycrawl.tools.checkstyle.Main" -Dexec.args="-c /sun_checks.xml src/main/java"
./mvnw exec:java -Dexec.mainClass="com.puppycrawl.tools.checkstyle.Main" -Dexec.args="-c /sun_checks.xml src/main/java"

ui:
cd src/main/client && npm run dev

server:
mvn spring-boot:run
./mvnw spring-boot:run -Dspring-boot.run.profiles=local

server-prod:
./mvnw spring-boot:run -Dspring-boot.run.profiles=prod

all:
make ui
Expand Down
11 changes: 4 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,12 @@ cd ergon
```
Build and run the backend
```bash
mvn clean install
(cd ./src/main/client && npm i)
mvn spring-boot:run
make server
```
At this point, you should be able to access the app at [localhost:8081](localhost:8081).

At this point, you should be able to access the app at [localhost:8080](localhost:8080).

_Note: By default, building the spring boot application, builds and hosts the front end alongside it. If you just want to work on the frontend, you can comment out the [following lines](https://github.com/tib-source/Ergon/blob/252ac784fafd1d4b5d170d7929db9f14e0bbab5e/pom.xml#L102-L137) and run_
```bash
cd ./src/main/client
npm i
npm run dev
make ui
```
22 changes: 17 additions & 5 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,23 @@
<properties>
<java.version>17</java.version>
</properties>
<profiles>
<profile>
<id>local</id>
<properties>
<env>local</env>
</properties>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
</profile>
<profile>
<id>prod</id>
<properties>
<env>prod</env>
</properties>
</profile>
</profiles>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
Expand All @@ -25,11 +42,6 @@
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-csv</artifactId>
Expand Down
21 changes: 21 additions & 0 deletions src/main/client/components.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"$schema": "https://ui.shadcn.com/schema.json",
"style": "new-york",
"rsc": false,
"tsx": true,
"tailwind": {
"config": "",
"css": "src/index.css",
"baseColor": "neutral",
"cssVariables": true,
"prefix": ""
},
"aliases": {
"components": "@/components",
"utils": "@/lib/utils",
"ui": "@/components/ui",
"lib": "@/lib",
"hooks": "@/hooks"
},
"iconLibrary": "lucide"
}
Loading