Update ma1sd to mxids
This commit is contained in:
4
.gitignore
vendored
4
.gitignore
vendored
@@ -7,8 +7,8 @@ out/
|
||||
.idea/
|
||||
|
||||
# Local dev config
|
||||
/ma1sd.yaml
|
||||
/mxids.yaml
|
||||
/application.yaml
|
||||
|
||||
# Local dev storage
|
||||
/ma1sd.db
|
||||
/mxids.db
|
||||
|
14
Dockerfile
14
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
|
||||
|
10
DockerfileX
10
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
|
||||
|
28
build.gradle
28
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
|
||||
}
|
||||
|
||||
|
@@ -1,9 +1,11 @@
|
||||
# From source
|
||||
- [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
|
||||
@@ -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:
|
||||
|
Reference in New Issue
Block a user