From acb2b5a37daff17ddf7924f5e7934a3674007665 Mon Sep 17 00:00:00 2001 From: Tomas Kracmar Date: Tue, 26 Mar 2024 13:21:48 +0100 Subject: [PATCH] Update ma1sd to mxids --- .gitignore | 4 ++-- Dockerfile | 14 +++++++------- DockerfileX | 10 +++++----- build.gradle | 28 ++++++++++++++-------------- docs/build.md | 16 +++++++++------- 5 files changed, 37 insertions(+), 35 deletions(-) diff --git a/.gitignore b/.gitignore index 9c12686..4310939 100644 --- a/.gitignore +++ b/.gitignore @@ -7,8 +7,8 @@ out/ .idea/ # Local dev config -/ma1sd.yaml +/mxids.yaml /application.yaml # Local dev storage -/ma1sd.db +/mxids.db diff --git a/Dockerfile b/Dockerfile index 6eb75f4..c778efd 100644 --- a/Dockerfile +++ b/Dockerfile @@ -10,17 +10,17 @@ FROM openjdk:8-jre-alpine RUN apk update && apk add bash && rm -rf /var/lib/apk/* /var/cache/apk/* -VOLUME /etc/ma1sd -VOLUME /var/ma1sd +VOLUME /etc/mxids +VOLUME /var/mxids EXPOSE 8090 ENV JAVA_OPTS="" -ENV CONF_FILE_PATH="/etc/ma1sd/ma1sd.yaml" -ENV SIGN_KEY_PATH="/var/ma1sd/sign.key" -ENV SQLITE_DATABASE_PATH="/var/ma1sd/ma1sd.db" +ENV CONF_FILE_PATH="/etc/mxids/mxids.yaml" +ENV SIGN_KEY_PATH="/var/mxids/sign.key" +ENV SQLITE_DATABASE_PATH="/var/mxids/mxids.db" CMD [ "/start.sh" ] ADD src/docker/start.sh /start.sh -ADD src/script/ma1sd /app/ma1sd -COPY --from=builder /ma1sd/build/libs/ma1sd.jar /app/ma1sd.jar +ADD src/script/mxids /app/mxids +COPY --from=builder /mxids/build/libs/mxids.jar /app/mxids.jar diff --git a/DockerfileX b/DockerfileX index 1e90969..a8080bf 100644 --- a/DockerfileX +++ b/DockerfileX @@ -5,12 +5,12 @@ VOLUME /var/ma1sd EXPOSE 8090 ENV JAVA_OPTS="" -ENV CONF_FILE_PATH="/etc/ma1sd/ma1sd.yaml" -ENV SIGN_KEY_PATH="/var/ma1sd/sign.key" -ENV SQLITE_DATABASE_PATH="/var/ma1sd/ma1sd.db" +ENV CONF_FILE_PATH="/etc/mxids/mxids.yaml" +ENV SIGN_KEY_PATH="/var/mxids/sign.key" +ENV SQLITE_DATABASE_PATH="/var/mxids/mxids.db" CMD [ "/start.sh" ] ADD src/docker/start.sh /start.sh -ADD src/script/ma1sd /app/ma1sd -ADD build/libs/ma1sd.jar /app/ma1sd.jar +ADD src/script/mxids /app/mxids +ADD build/libs/mxids.jar /app/mxids.jar diff --git a/build.gradle b/build.gradle index 8711276..ae0dccf 100644 --- a/build.gradle +++ b/build.gradle @@ -1,5 +1,5 @@ /* - * ma1sd - Matrix Identity Server Daemon + * mxids - Matrix Identity Server * Copyright (C) 2017 Kamax Sarl * * https://www.kamax.io/ @@ -26,16 +26,16 @@ apply plugin: 'com.github.johnrengelman.shadow' apply plugin: 'idea' apply plugin: 'com.github.ben-manes.versions' -def confFileName = "ma1sd.example.yaml" +def confFileName = "mxids.example.yaml" def distDir = "${project.buildDir}/dist" -def debBinPath = "/usr/lib/ma1sd" -def debConfPath = "/etc/ma1sd" -def debDataPath = "/var/lib/ma1sd" +def debBinPath = "/usr/lib/mxids" +def debConfPath = "/etc/mxids" +def debDataPath = "/var/lib/mxids" def debSystemdPath = "/etc/systemd/system" def debConfFileName = confFileName -def debStartScriptFilename = "ma1sd" +def debStartScriptFilename = "mxids" def debBuildBasePath = "${project.buildDir}/tmp/debian" def debBuildDebianPath = "${debBuildBasePath}/DEBIAN" @@ -44,8 +44,8 @@ def debBuildConfPath = "${debBuildBasePath}${debConfPath}" def debBuildDataPath = "${debBuildBasePath}${debDataPath}" def debBuildSystemdPath = "${debBuildBasePath}${debSystemdPath}" -def dockerImageName = "ma1uta/ma1sd" -def dockerImageTag = "${dockerImageName}:${ma1sdVersion()}" +def dockerImageName = "cqrenet/mxids" +def dockerImageTag = "${dockerImageName}:${mxidsVersion()}" group = 'io.kamax' mainClassName = 'io.kamax.mxisd.MxisdStandaloneExec' @@ -55,7 +55,7 @@ targetCompatibility = '1.8' String ma1sdVersion() { def versionPattern = Pattern.compile("v(\\d+\\.)?(\\d+\\.)?(\\d+)(-.*)?") - String version = System.getenv('MA1SD_BUILD_VERSION') + String version = System.getenv('MXIDS_BUILD_VERSION') if (version == null || version.size() == 0) { version = gitVersion() } @@ -166,7 +166,7 @@ dependencies { jar { manifest { attributes( - 'Implementation-Version': ma1sdVersion() + 'Implementation-Version': mxidsVersion() ) } } @@ -179,7 +179,7 @@ shadowJar { task debBuild(dependsOn: shadowJar) { doLast { - String debVersion = ma1sdVersion() + String debVersion = mxidsVersion() println "Version for package: ${debVersion}" mkdir distDir mkdir debBuildBasePath @@ -190,7 +190,7 @@ task debBuild(dependsOn: shadowJar) { mkdir debBuildSystemdPath copy { - from "${project.buildDir}/libs/ma1sd.jar" + from "${project.buildDir}/libs/mxids.jar" into debBuildBinPath } @@ -238,7 +238,7 @@ task debBuild(dependsOn: shadowJar) { ant.replace( file: "${debBuildDebianPath}/postinst", token: '%DEB_CONF_FILE%', - value: "${debConfPath}/ma1sd.yaml" + value: "${debConfPath}/mxids.yaml" ) ant.chmod( @@ -252,7 +252,7 @@ task debBuild(dependsOn: shadowJar) { ) copy { - from "${project.file('src/systemd/ma1sd.service')}" + from "${project.file('src/systemd/mxids.service')}" into debBuildSystemdPath } diff --git a/docs/build.md b/docs/build.md index 46f431c..de018ad 100644 --- a/docs/build.md +++ b/docs/build.md @@ -1,10 +1,12 @@ # From source -- [Binaries](#binaries) - - [Requirements](#requirements) - - [Build](#build) -- [Debian package](#debian-package) -- [Docker image](#docker-image) -- [Next steps](#next-steps) +- [From source](#from-source) + - [Binaries](#binaries) + - [Requirements](#requirements) + - [Build](#build) + - [Debian package](#debian-package) + - [Docker image](#docker-image) + - [Multi-platform builds](#multi-platform-builds) + - [Next steps](#next-steps) ## Binaries ### Requirements @@ -19,7 +21,7 @@ cd ma1sd ./gradlew build ``` -Create a new configuration file by coping `ma1sd.example.yaml` to `ma1sd.yaml` and edit to your needs. +Create a new configuration file by coping `mxids.example.yaml` to `mxids.yaml` and edit to your needs. For advanced configuration, see the [Configure section](configure.md). Start the server in foreground to validate the build and configuration: