-
Notifications
You must be signed in to change notification settings - Fork 2
Closes #84 – Improve homescreen design #27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
98b40a1
c1b5f70
bf4d977
148411e
9ac7b57
875d1ef
9289c7d
6bdb1ef
781e34a
511b5ee
aaeba6d
524f33c
8cc69d8
c0e3de6
bcb828c
945d32b
3128ac7
d4e7481
5c80eaa
6950c14
78f7e21
86f2ba7
103178a
a88d957
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,32 @@ | ||
| name: Java CI with Maven | ||
|
|
||
| on: | ||
| push: | ||
| branches: [ "main" ] | ||
| pull_request: | ||
| branches: [ "main" ] | ||
|
|
||
| jobs: | ||
| build: | ||
| runs-on: ubuntu-latest | ||
|
|
||
| steps: | ||
| - uses: actions/checkout@v4 | ||
|
|
||
| - name: Get Java Version | ||
| run: | | ||
| JAVA_VERSION=$(mvn help:evaluate "-Dexpression=maven.compiler.release" -q -DforceStdout) | ||
| echo "JAVA_VERSION=$JAVA_VERSION" >> $GITHUB_ENV | ||
|
|
||
| - name: Set up JDK ${{ env.JAVA_VERSION }} | ||
| uses: actions/setup-java@v4 | ||
| with: | ||
| java-version: ${{ env.JAVA_VERSION }} | ||
| distribution: 'temurin' | ||
| cache: maven | ||
|
|
||
| - name: Compile with Maven | ||
| run: mvn -B compile --file pom.xml | ||
|
|
||
| - name: Test with Maven | ||
| run: mvn -B test --file pom.xml |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,35 @@ | ||
| name: Publish Docker Image to Github Packages on Release | ||
| on: | ||
| release: | ||
| types: | ||
| - published | ||
| jobs: | ||
| publish: | ||
| runs-on: ubuntu-latest | ||
| permissions: | ||
| contents: read | ||
| packages: write | ||
| steps: | ||
| - uses: actions/checkout@v6.0.2 | ||
| - uses: docker/setup-qemu-action@v3.7.0 | ||
| - uses: docker/setup-buildx-action@v3.12.0 | ||
| - name: Log in to GHCR | ||
| uses: docker/login-action@v3.7.0 | ||
| with: | ||
| registry: ghcr.io | ||
| username: ${{ github.actor }} | ||
| password: ${{ secrets.GITHUB_TOKEN }} | ||
| - name: Extract metadata | ||
| id: meta | ||
| uses: docker/metadata-action@v5.10.0 | ||
| with: | ||
| images: ghcr.io/ithsjava25/webserver | ||
| - name: Build and push | ||
| uses: docker/build-push-action@v6.18.0 | ||
| with: | ||
| context: . | ||
| push: true | ||
| platforms: linux/amd64, linux/arm64 | ||
| tags: ${{ steps.meta.outputs.tags }} | ||
| labels: ${{ steps.meta.outputs.labels }} | ||
|
|
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| FROM maven:3-eclipse-temurin-25-alpine AS build | ||
| WORKDIR /build | ||
| COPY src/ src/ | ||
| COPY pom.xml pom.xml | ||
| RUN mvn compile | ||
| RUN mvn dependency:copy-dependencies -DincludeScope=compile | ||
|
|
||
| FROM eclipse-temurin:25-jre-alpine | ||
| EXPOSE 8080 | ||
| RUN addgroup -S appgroup && adduser -S appuser -G appgroup | ||
| WORKDIR /app/ | ||
| COPY --from=build /build/target/classes/ /app/ | ||
| COPY --from=build /build/target/dependency/ /app/dependencies/ | ||
| COPY /www/ /www/ | ||
| USER appuser | ||
| ENTRYPOINT ["java", "-classpath", "/app:/app/dependencies/*", "org.example.App"] | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,49 @@ | ||
| # Konfiguration: port (CLI → config-fil → default) | ||
|
|
||
| Det här projektet väljer vilken port servern ska starta på enligt följande prioritet: | ||
|
|
||
| 1. **CLI-argument** (`--port <port>`) – högst prioritet | ||
| 2. **Config-fil** (`application.yml`: `server.port`) | ||
| 3. **Default** (`8080`) – används om port saknas i config eller om config-filen saknas | ||
|
|
||
| --- | ||
|
|
||
| ## 1) Default-värde | ||
|
|
||
| Om varken CLI eller config anger port används: | ||
|
|
||
| - **8080** (default för `server.port` i `AppConfig`) | ||
|
|
||
| --- | ||
|
|
||
| ## 2) Config-fil: `application.yml` | ||
|
|
||
| ### Var ska filen ligga? | ||
| Standard: | ||
| - `src/main/resources/application.yml` | ||
|
|
||
| ### Exempel | ||
| ```yaml | ||
| server: | ||
| port: 9090 | ||
| ``` | ||
|
Comment on lines
+26
to
+29
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fix YAML indentation in the example. The 📝 Proposed fix ```yaml
server:
-port: 9090
+ port: 9090Verify each finding against the current code and only fix it if needed. In |
||
|
|
||
| --- | ||
|
|
||
| ## 3) CLI-argument | ||
|
|
||
| CLI kan användas för att override:a config: | ||
|
|
||
| ```bash | ||
| java -cp target/classes org.example.App --port 8000 | ||
| ``` | ||
|
|
||
| --- | ||
|
|
||
| ## 4) Sammanfattning | ||
|
|
||
| Prioritet: | ||
|
|
||
| 1. CLI (`--port`) | ||
| 2. `application.yml` (`server.port`) | ||
| 3. Default (`8080`) | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Runtime paths don’t match app expectations for config and web root.
From Line 11, working dir is
/app, but Line 14 copies static files to/wwwwhile default config uses./www. AlsoAppresolves config viasrc/main/resources/application.yml, which is not copied into that path in the runtime image. This can break static serving/config loading in container runs.Proposed fix
🤖 Prompt for AI Agents