Compare commits

..

4 Commits

Author SHA1 Message Date
siujamo 0269683b68 fix: mount README.md to / not /data for docker-pushrm
Build and Deploy / build-and-release (release) Failing after 3m0s
The docker-pushrm image (busybox-based) has no WORKDIR set, defaulting
to /. FindReadmeFile() searches ./ relative to WORKDIR, so the file
must be at /README.md, not /data/ or /workspace/.
2026-06-08 14:46:19 +08:00
siujamo 3f2066f8b2 fix: update docker-pushrm README mount path from /workspace to /data
Build and Deploy / build-and-release (release) Failing after 3m49s
docker-pushrm v2 changed the WORKDIR from /workspace to /data, causing the
README push step to fail when using the :latest tag.
2026-06-08 14:14:05 +08:00
siujamo a2469c7573 docs: update application configuration example
Build and Deploy / build-and-release (release) Failing after 5m14s
2026-06-08 13:32:16 +08:00
siujamo 62fcce3005 feat: add OCI labels and README push for Docker Hub
Add OCI standard labels to Dockerfile.ci and push README.md to
Docker Hub image page via docker-pushrm in CI workflow.
2026-06-05 10:20:15 +08:00
4 changed files with 37 additions and 44 deletions
+14 -1
View File
@@ -65,8 +65,21 @@ jobs:
with:
context: .
file: Dockerfile.ci
build-args: JAR_FILE=${{ steps.jar.outputs.file }}
build-args: |
JAR_FILE=${{ steps.jar.outputs.file }}
IMAGE_VERSION=${{ gitea.event.release.tag_name }}
IMAGE_VENDOR=${{ vars.VENDOR }}
BUILD_DATE=${{ gitea.event.release.published_at }}
push: true
tags: |
${{ steps.meta.outputs.tag_version }}
${{ steps.meta.outputs.tag_latest }}
- name: Push README to Docker Hub
run: >
docker run --rm
-v "$(pwd)/README.md:/README.md:ro"
-e DOCKER_USER="${{ vars.DOCKER_HUB_USERNAME }}"
-e DOCKER_PASS="${{ secrets.DOCKER_HUB_TOKEN }}"
chko/docker-pushrm:latest
"${{ vars.DOCKER_HUB_USERNAME }}/${{ env.APP_NAME }}"
-34
View File
@@ -1,34 +0,0 @@
variables:
GRADLE_OPTS: -Dorg.gradle.daemon=false
DOCKER_HOST: unix:///var/run/docker.sock
stages:
- release
release:
stage: release
image: amazoncorretto:21-alpine
cache:
key: gradle
paths:
- .gradle/wrapper
- .gradle/caches
before_script:
- chmod +x gradlew
- apk add --no-cache docker-cli
script:
- ./gradlew bootJar -x test -PartefactVersion="$CI_COMMIT_TAG"
- JAR_FILE=$(find build/libs -name '*.jar' | head -1)
- echo "Building Docker image for tag $CI_COMMIT_TAG with JAR $JAR_FILE"
- docker build
-f Dockerfile.ci
--build-arg JAR_FILE="$JAR_FILE"
-t "$CI_REGISTRY_IMAGE:$CI_COMMIT_TAG"
.
- docker tag "$CI_REGISTRY_IMAGE:$CI_COMMIT_TAG" "$CI_REGISTRY_IMAGE:latest"
- echo "Pushing image $CI_REGISTRY_IMAGE:$CI_COMMIT_TAG"
- docker login "$CI_REGISTRY" -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD"
- docker push "$CI_REGISTRY_IMAGE:$CI_COMMIT_TAG"
- docker push "$CI_REGISTRY_IMAGE:latest"
rules:
- if: $CI_COMMIT_TAG
+12
View File
@@ -2,6 +2,18 @@ FROM amazoncorretto:21-alpine
WORKDIR /app
ARG JAR_FILE
ARG IMAGE_VERSION=dev
ARG IMAGE_VENDOR=OnixByte
ARG BUILD_DATE
COPY ${JAR_FILE} app.jar
LABEL org.opencontainers.image.title="delta-force-guide-server" \
org.opencontainers.image.description="REST API backend for managing Delta Force game firearm builds and modifications" \
org.opencontainers.image.version="${IMAGE_VERSION}" \
org.opencontainers.image.vendor="${IMAGE_VENDOR}" \
org.opencontainers.image.source="https://git.onixbyte.com/onixbyte/delta-force-guide-server" \
org.opencontainers.image.licenses="MIT" \
org.opencontainers.image.created="${BUILD_DATE}"
ENTRYPOINT ["java", "-jar", "app.jar"]
+11 -9
View File
@@ -9,15 +9,19 @@ spring:
host: localhost
port: 6379
database: 0
# password: 6hLFVqfGPviTYukn # Uncomment if password is necessary
# password: qwerty # Uncomment if password is necessary
logging:
pattern:
# dateformat: dd MMM yyyy HH:mm:ss.SSS # Modify this for custom date format.
app:
common:
version: 1.3.0.8-dev # Application version, you can change to any version you like, used for communication with frontend.
cookie:
http-only: true
secure: false
same-site: none
path: '/'
max-age: P1D
cors:
allowed-origins: # Cross-origin allowed origins
- "http://localhost:5173" # Dev server for vite.
@@ -41,12 +45,10 @@ app:
issuer: dfguide.local # Issuer host
secret: qwertyuiopasdfghjklzxcvbnm123456 # JWT singing secret, a 32-byte long or longer string is recommended
valid-time: PT2H # JWT valid duration
cookie: # Cookie settings.
http-only: true
secure: false
same-site: lax
path: '/'
max-age: PT2H
webhook:
github:
secret: 123456
allowed-users: [ octotcat, onixbyte ]
springdoc:
api-docs: