mirror of
https://github.com/Sheldan/Sissi.git
synced 2026-01-26 19:21:43 +00:00
Compare commits
79 Commits
sissi-1.4.
...
e097fbe0ef
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e097fbe0ef | ||
|
|
8639038be2 | ||
|
|
295abaf4cf | ||
|
|
de478506fc | ||
|
|
b0b3db0a44 | ||
|
|
ed5e4ea5a7 | ||
|
|
627229ebd9 | ||
|
|
f4300070b9 | ||
|
|
725a0c4f2c | ||
|
|
1fbeb880b7 | ||
|
|
7a327deab9 | ||
|
|
a1f0cf58b9 | ||
|
|
2e7caa80bb | ||
|
|
32e80a5b84 | ||
|
|
96a230f347 | ||
|
|
88a4d45d22 | ||
|
|
858317a7f4 | ||
|
|
b69c873efe | ||
|
|
c93be84aef | ||
|
|
a61a128236 | ||
|
|
a1b2700092 | ||
|
|
da7cc2f6a7 | ||
|
|
4cb118339f | ||
|
|
11460f1e19 | ||
|
|
c9b856b300 | ||
|
|
c513087d30 | ||
|
|
8a110215f1 | ||
|
|
90b9c3674c | ||
|
|
68771a7b26 | ||
|
|
72e7bb57e3 | ||
|
|
3e147a37d9 | ||
|
|
99dca4906a | ||
|
|
32bfefc5b2 | ||
|
|
aa135b4663 | ||
|
|
4ffb5e5640 | ||
|
|
9376ac416f | ||
|
|
7cf44c99b7 | ||
|
|
5dce059d2b | ||
|
|
da30a120d7 | ||
|
|
49875b2467 | ||
|
|
2236710086 | ||
|
|
99b266e94a | ||
|
|
974ab230ac | ||
|
|
e5239f971c | ||
|
|
23db0b7c9e | ||
|
|
8167accd34 | ||
|
|
375045f508 | ||
|
|
3f4d5510d8 | ||
|
|
ba67f65bea | ||
|
|
1b7c2263ae | ||
|
|
f065bf5244 | ||
|
|
e036fd0867 | ||
|
|
96960d77ac | ||
|
|
3894d4567e | ||
|
|
503fd2520d | ||
|
|
58d6b12a67 | ||
|
|
4128274a7d | ||
|
|
3b498c5d3f | ||
|
|
c6bdcaa84c | ||
|
|
90f3dd0ae9 | ||
|
|
cd482d640f | ||
|
|
ae2f88daa3 | ||
|
|
c13f40fd3b | ||
|
|
37147a866f | ||
|
|
9a7d0613b1 | ||
|
|
7e60447ae6 | ||
|
|
e4a899a125 | ||
|
|
ce8341e69a | ||
|
|
fa6333fa49 | ||
|
|
3393dea591 | ||
|
|
3c3bdfaed9 | ||
|
|
172e3c4190 | ||
|
|
52b86804b9 | ||
|
|
de8d9982f3 | ||
|
|
29e1b22783 | ||
|
|
5852d4837e | ||
|
|
b345fa5502 | ||
|
|
d6470e3714 | ||
|
|
b4cebe2b41 |
4
.env
Normal file
4
.env
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
REGISTRY_PREFIX=harbor.sheldan.dev/sissi/
|
||||||
|
ABSTRACTO_PREFIX=harbor.sheldan.dev/abstracto/
|
||||||
|
VERSION=1.4.43
|
||||||
|
ABSTRACTO_VERSION=1.5.24
|
||||||
48
.github/workflows/release.yml
vendored
48
.github/workflows/release.yml
vendored
@@ -1,48 +0,0 @@
|
|||||||
name: Publish package to GitHub Packages
|
|
||||||
on:
|
|
||||||
release:
|
|
||||||
types: [created]
|
|
||||||
jobs:
|
|
||||||
publish:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
with:
|
|
||||||
persist-credentials: false
|
|
||||||
- name: Set up Java for publishing to GitHub Packages
|
|
||||||
uses: actions/setup-java@v3
|
|
||||||
with:
|
|
||||||
distribution: 'corretto'
|
|
||||||
java-version: 17
|
|
||||||
- name: Load current version
|
|
||||||
id: version
|
|
||||||
run: echo "version=$(mvn -s settings.xml --file pom.xml -q -Dexec.executable="echo" -Dexec.args='${project.version}' --non-recursive exec:exec)" >> $GITHUB_ENV
|
|
||||||
- name: Publish to GitHub Packages
|
|
||||||
run: mvn -s settings.xml --file pom.xml -B deploy -Dmaven.wagon.http.pool=false -DskipTests=true
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
user: Sheldan
|
|
||||||
token: ${{ secrets.ABSTRACTO_PAT }}
|
|
||||||
- name: Login to Harbor
|
|
||||||
uses: docker/login-action@v2
|
|
||||||
with:
|
|
||||||
registry: harbor.sheldan.dev
|
|
||||||
username: ${{ secrets.HARBOR_USERNAME }}
|
|
||||||
password: ${{ secrets.HARBOR_TOKEN }}
|
|
||||||
- name: Load env files
|
|
||||||
id: dotenv
|
|
||||||
uses: falti/dotenv-action@v1.0.4
|
|
||||||
with:
|
|
||||||
path: ./deployment/image-packaging/src/main/docker/.env
|
|
||||||
- name: Push container
|
|
||||||
working-directory: ./deployment/image-packaging/src/main/docker
|
|
||||||
run: docker-compose build && docker-compose push
|
|
||||||
env:
|
|
||||||
REGISTRY_PREFIX: ${{ steps.dotenv.outputs.registry_prefix }}
|
|
||||||
VERSION: ${{ steps.dotenv.outputs.version }}
|
|
||||||
- name: Helm push
|
|
||||||
working-directory: ./deployment/helm/
|
|
||||||
run: |-
|
|
||||||
helm registry login -u '${{ secrets.HARBOR_USERNAME }}' -p '${{ secrets.HARBOR_TOKEN }}' harbor.sheldan.dev
|
|
||||||
helm package sissi
|
|
||||||
helm push sissi*.tgz oci://harbor.sheldan.dev/sissi
|
|
||||||
86
.github/workflows/release_manual.yaml
vendored
Normal file
86
.github/workflows/release_manual.yaml
vendored
Normal file
@@ -0,0 +1,86 @@
|
|||||||
|
name: Publishes a new version of Sissi
|
||||||
|
on: workflow_dispatch
|
||||||
|
permissions:
|
||||||
|
packages: write
|
||||||
|
contents: write
|
||||||
|
jobs:
|
||||||
|
publish:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
ref: master
|
||||||
|
- name: Set up JDK
|
||||||
|
uses: actions/setup-java@v3
|
||||||
|
with:
|
||||||
|
distribution: 'corretto'
|
||||||
|
java-version: 17
|
||||||
|
- name: Load current version
|
||||||
|
id: version
|
||||||
|
run: echo "version=$(mvn -q -Dexec.executable="echo" -Dexec.args='${project.version}' --non-recursive exec:exec | cut -d- -f1)" >> $GITHUB_ENV
|
||||||
|
- name: Release maven packages
|
||||||
|
uses: qcastel/github-actions-maven-release@v1.12.41
|
||||||
|
env:
|
||||||
|
JAVA_HOME: /usr/lib/jvm/java-17-openjdk/
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
abstractoUser: Sheldan
|
||||||
|
abstractoToken: ${{ secrets.ABSTRACTO_PAT }}
|
||||||
|
with:
|
||||||
|
git-release-bot-name: "release-bot"
|
||||||
|
git-release-bot-email: "release-bot@sheldan.dev"
|
||||||
|
release-branch-name: master
|
||||||
|
maven-args: "-Dmaven.javadoc.skip=true -s settings.xml -DskipTests"
|
||||||
|
access-token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
- name: Login to Harbor
|
||||||
|
uses: docker/login-action@v2
|
||||||
|
with:
|
||||||
|
registry: harbor.sheldan.dev
|
||||||
|
username: ${{ secrets.HARBOR_USERNAME }}
|
||||||
|
password: ${{ secrets.HARBOR_TOKEN }}
|
||||||
|
- name: Update Chart version file
|
||||||
|
uses: fjogeleit/yaml-update-action@v0.13.2
|
||||||
|
with:
|
||||||
|
valueFile: 'deployment/helm/sissi/Chart.yaml'
|
||||||
|
propertyPath: 'version'
|
||||||
|
value: ${{ env.version }}
|
||||||
|
commitChange: false
|
||||||
|
- name: Update value files version
|
||||||
|
uses: fjogeleit/yaml-update-action@v0.13.2
|
||||||
|
with:
|
||||||
|
valueFile: 'deployment/helm/sissi/values.yaml'
|
||||||
|
commitChange: false
|
||||||
|
changes: |
|
||||||
|
{
|
||||||
|
"bot.tag": "${{ env.version }}",
|
||||||
|
"restApi.tag": "${{ env.version }}",
|
||||||
|
"privateRestApi.tag": "${{ env.version }}",
|
||||||
|
"templateDeploymentData.tag": "${{ env.version }}",
|
||||||
|
"dbConfigDeploymentData.tag": "${{ env.version }}"
|
||||||
|
}
|
||||||
|
- name: Update .env version
|
||||||
|
run:
|
||||||
|
sed -i '3s/.*/VERSION=${{ env.version }}/' .env
|
||||||
|
- name: Load env file
|
||||||
|
id: dotenv
|
||||||
|
uses: falti/dotenv-action@v1.0.4
|
||||||
|
with:
|
||||||
|
path: .env
|
||||||
|
- name: Build and push Docker containers
|
||||||
|
run: docker-compose build && docker-compose push
|
||||||
|
env:
|
||||||
|
REGISTRY_PREFIX: ${{ steps.dotenv.outputs.registry_prefix }}
|
||||||
|
VERSION: ${{ steps.dotenv.outputs.version }}
|
||||||
|
- name: Helm package and push
|
||||||
|
working-directory: ./deployment/helm/
|
||||||
|
run: |-
|
||||||
|
helm registry login -u '${{ secrets.HARBOR_USERNAME }}' -p '${{ secrets.HARBOR_TOKEN }}' harbor.sheldan.dev
|
||||||
|
helm package sissi
|
||||||
|
helm push sissi*.tgz oci://harbor.sheldan.dev/sissi
|
||||||
|
- name: Fix file permissions
|
||||||
|
run:
|
||||||
|
sudo chmod -R ugo+rwX . # https://github.com/actions/checkout/issues/164
|
||||||
|
- name: Commit updated versions
|
||||||
|
uses: EndBug/add-and-commit@v9
|
||||||
|
with:
|
||||||
|
author_name: "release-bot"
|
||||||
|
author_email: "release-bot@sheldan.dev"
|
||||||
4
.gitignore
vendored
4
.gitignore
vendored
@@ -21,5 +21,9 @@ target/
|
|||||||
*.tar.gz
|
*.tar.gz
|
||||||
*.rar
|
*.rar
|
||||||
|
|
||||||
|
Chart.lock
|
||||||
|
|
||||||
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
|
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
|
||||||
hs_err_pid*
|
hs_err_pid*
|
||||||
|
|
||||||
|
*.tgz
|
||||||
3
.tiltignore
Normal file
3
.tiltignore
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
*.tgz
|
||||||
|
tilt/sissi-dev/tmpcharts/
|
||||||
|
tilt/sissi-dev/charts/*.tgz
|
||||||
11
Tiltfile
11
Tiltfile
@@ -2,6 +2,7 @@ allow_k8s_contexts('k8s-cluster')
|
|||||||
|
|
||||||
load('ext://restart_process', 'docker_build_with_restart')
|
load('ext://restart_process', 'docker_build_with_restart')
|
||||||
registry = 'harbor.sheldan.dev/sissi/'
|
registry = 'harbor.sheldan.dev/sissi/'
|
||||||
|
abstracto_registry = 'harbor.sheldan.dev/abstracto/'
|
||||||
|
|
||||||
local_resource(
|
local_resource(
|
||||||
'sissi-java-compile',
|
'sissi-java-compile',
|
||||||
@@ -28,11 +29,17 @@ docker_build_with_restart(
|
|||||||
)
|
)
|
||||||
|
|
||||||
docker_build(registry + 'sissi-db-data', 'deployment/image-packaging/src/main/docker/db-data/')
|
docker_build(registry + 'sissi-db-data', 'deployment/image-packaging/src/main/docker/db-data/')
|
||||||
docker_build(registry + 'sissi-rest-api', 'deployment/image-packaging/src/main/docker/rest-api/')
|
docker_build(registry + 'sissi-debra-rest-api', 'python/modules/debra-rest-api/', dockerfile='python/modules/debra-rest-api/docker/Dockerfile')
|
||||||
|
update_settings(suppress_unused_image_warnings=[registry + "sissi-debra-rest-api"]) # only used in docker image building
|
||||||
|
docker_build(registry + 'sissi-image-gen-api', 'python/modules/image-gen-api/', dockerfile='python/modules/image-gen-api/docker/Dockerfile')
|
||||||
|
update_settings(suppress_unused_image_warnings=[registry + "sissi-image-gen-api"]) # only used in docker image building
|
||||||
|
docker_build(registry + 'sissi-rest-api', 'deployment/image-packaging/src/main/docker/rest-api/', build_args={'REGISTRY_PREFIX': abstracto_registry, 'SISSI_REGISTRY_PREFIX': registry})
|
||||||
|
docker_build(registry + 'sissi-private-rest-api', 'deployment/image-packaging/src/main/docker/private-rest-api/', build_args={'REGISTRY_PREFIX': abstracto_registry, 'SISSI_REGISTRY_PREFIX': registry})
|
||||||
docker_build(registry + 'sissi-template-data', 'deployment/image-packaging/src/main/docker/template-data/')
|
docker_build(registry + 'sissi-template-data', 'deployment/image-packaging/src/main/docker/template-data/')
|
||||||
|
|
||||||
|
|
||||||
k8s_yaml(helm('deployment/helm/sissi', values=
|
local('cd tilt/sissi-dev && helm dep up')
|
||||||
|
k8s_yaml(helm('tilt/sissi-dev', values=
|
||||||
['./../Sissi-environments/argocd/apps/sissi/values/local/values.yaml',
|
['./../Sissi-environments/argocd/apps/sissi/values/local/values.yaml',
|
||||||
'secrets://./../Sissi-environments/argocd/apps/sissi/values/local/values.secrets.yaml']
|
'secrets://./../Sissi-environments/argocd/apps/sissi/values/local/values.secrets.yaml']
|
||||||
))
|
))
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>dev.sheldan.sissi.application</groupId>
|
<groupId>dev.sheldan.sissi.application</groupId>
|
||||||
<artifactId>application</artifactId>
|
<artifactId>application</artifactId>
|
||||||
<version>1.4.24</version>
|
<version>1.4.44-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<artifactId>executable</artifactId>
|
<artifactId>executable</artifactId>
|
||||||
@@ -136,6 +136,21 @@
|
|||||||
<artifactId>statistic-impl</artifactId>
|
<artifactId>statistic-impl</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>dev.sheldan.abstracto.modules</groupId>
|
||||||
|
<artifactId>sticky-roles-impl</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>dev.sheldan.abstracto.modules</groupId>
|
||||||
|
<artifactId>giveaway-impl</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>dev.sheldan.abstracto.modules</groupId>
|
||||||
|
<artifactId>image-generation-impl</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
<!-- sissi modules -->
|
<!-- sissi modules -->
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
@@ -170,6 +185,12 @@
|
|||||||
<version>${project.version}</version>
|
<version>${project.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>dev.sheldan.sissi.application.module.custom</groupId>
|
||||||
|
<artifactId>image-generation-custom</artifactId>
|
||||||
|
<version>${project.version}</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
</project>
|
</project>
|
||||||
@@ -2,8 +2,8 @@ spring.datasource.url=jdbc:postgresql://${DB_HOST}:${DB_PORT}/${DB_NAME}
|
|||||||
spring.datasource.username= ${DB_USER}
|
spring.datasource.username= ${DB_USER}
|
||||||
spring.datasource.password= ${DB_PASS}
|
spring.datasource.password= ${DB_PASS}
|
||||||
spring.datasource.hikari.maximum-pool-size=${hikariPoolSize}
|
spring.datasource.hikari.maximum-pool-size=${hikariPoolSize}
|
||||||
spring.jpa.hibernate.default_schema=abstracto
|
spring.jpa.hibernate.default_schema=${DB_SCHEMA}
|
||||||
spring.jpa.properties.hibernate.default_schema=abstracto
|
spring.jpa.properties.hibernate.default_schema=${DB_SCHEMA}
|
||||||
spring.quartz.jdbc.initialize-schema=never
|
spring.quartz.jdbc.initialize-schema=never
|
||||||
management.metrics.tags.application=Sissi
|
management.metrics.tags.application=Sissi
|
||||||
management.endpoint.health.probes.enabled=true
|
management.endpoint.health.probes.enabled=true
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>dev.sheldan.sissi</groupId>
|
<groupId>dev.sheldan.sissi</groupId>
|
||||||
<artifactId>sissi</artifactId>
|
<artifactId>sissi</artifactId>
|
||||||
<version>1.4.24</version>
|
<version>1.4.44-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,25 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
<parent>
|
||||||
|
<groupId>dev.sheldan.sissi.application.module.custom</groupId>
|
||||||
|
<artifactId>sissi-customizations</artifactId>
|
||||||
|
<version>1.4.44-SNAPSHOT</version>
|
||||||
|
</parent>
|
||||||
|
|
||||||
|
<artifactId>image-generation-custom</artifactId>
|
||||||
|
|
||||||
|
|
||||||
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>dev.sheldan.abstracto.modules</groupId>
|
||||||
|
<artifactId>image-generation-int</artifactId>
|
||||||
|
<version>${abstracto.version}</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>dev.sheldan.abstracto.core</groupId>
|
||||||
|
<artifactId>core-int</artifactId>
|
||||||
|
<version>${abstracto.version}</version>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
</project>
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
<assembly xmlns="http://maven.apache.org/ASSEMBLY/2.1.0"
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:schemaLocation="http://maven.apache.org/ASSEMBLY/2.1.0 http://maven.apache.org/xsd/assembly-2.1.0.xsd">
|
||||||
|
<id>liquibase</id>
|
||||||
|
<formats>
|
||||||
|
<format>zip</format>
|
||||||
|
</formats>
|
||||||
|
<includeBaseDirectory>false</includeBaseDirectory>
|
||||||
|
<fileSets>
|
||||||
|
<fileSet>
|
||||||
|
<outputDirectory>.</outputDirectory>
|
||||||
|
<directory>${project.basedir}/src/main/resources/migrations</directory>
|
||||||
|
<includes>
|
||||||
|
<include>**/*</include>
|
||||||
|
</includes>
|
||||||
|
</fileSet>
|
||||||
|
</fileSets>
|
||||||
|
</assembly>
|
||||||
@@ -0,0 +1,80 @@
|
|||||||
|
package dev.sheldan.sissi.module.custom.imagegeneration.command;
|
||||||
|
|
||||||
|
import dev.sheldan.abstracto.core.command.CommandAlternative;
|
||||||
|
import dev.sheldan.abstracto.core.command.execution.UnParsedCommandParameter;
|
||||||
|
import dev.sheldan.abstracto.core.command.service.CommandRegistry;
|
||||||
|
import dev.sheldan.abstracto.core.config.ListenerPriority;
|
||||||
|
import dev.sheldan.abstracto.core.service.ChannelService;
|
||||||
|
import dev.sheldan.abstracto.core.service.FeatureFlagService;
|
||||||
|
import dev.sheldan.abstracto.core.templating.model.AttachedFile;
|
||||||
|
import dev.sheldan.abstracto.core.templating.model.MessageToSend;
|
||||||
|
import dev.sheldan.abstracto.core.templating.service.TemplateService;
|
||||||
|
import dev.sheldan.abstracto.core.utils.FileService;
|
||||||
|
import dev.sheldan.abstracto.core.utils.FutureUtils;
|
||||||
|
import dev.sheldan.abstracto.imagegeneration.config.ImageGenerationFeatureConfig;
|
||||||
|
import dev.sheldan.sissi.module.custom.imagegeneration.service.ImageGenerationService;
|
||||||
|
import net.dv8tion.jda.api.entities.Guild;
|
||||||
|
import net.dv8tion.jda.api.entities.Message;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
import java.io.File;
|
||||||
|
import java.util.Arrays;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Component
|
||||||
|
public class OrangeSunDogeCommandAlternative implements CommandAlternative {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private ImageGenerationService imageGenerationService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private TemplateService templateService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private ChannelService channelService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private FileService fileService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private CommandRegistry commandRegistry;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private FeatureFlagService featureFlagService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private ImageGenerationFeatureConfig imageGenerationFeatureConfig;
|
||||||
|
|
||||||
|
private static final String DOGE_ORANGE_SUN_RESPONSE_TEMPLATE_KEY = "doge_orangeSun_response";
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean shouldExecute(UnParsedCommandParameter parameter, Guild guild, Message message) {
|
||||||
|
String contentStripped = message.getContentRaw();
|
||||||
|
String[] parameters = contentStripped.split(" ");
|
||||||
|
return parameters.length == 1 && featureFlagService.isFeatureEnabled(imageGenerationFeatureConfig, guild.getIdLong());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void execute(UnParsedCommandParameter parameter, Message message) {
|
||||||
|
String contentStripped = message.getContentRaw();
|
||||||
|
List<String> parameters = Arrays.asList(contentStripped.split(" "));
|
||||||
|
String inputText = commandRegistry.getCommandName(parameters.get(0), message.getGuild().getIdLong());
|
||||||
|
File triggeredGifFile = imageGenerationService.getOrangeSunDogeImage(inputText);
|
||||||
|
MessageToSend messageToSend = templateService.renderEmbedTemplate(DOGE_ORANGE_SUN_RESPONSE_TEMPLATE_KEY, new Object());
|
||||||
|
// template support does not support binary files
|
||||||
|
AttachedFile file = AttachedFile
|
||||||
|
.builder()
|
||||||
|
.file(triggeredGifFile)
|
||||||
|
.fileName("doge.png")
|
||||||
|
.build();
|
||||||
|
messageToSend.getAttachedFiles().add(file);
|
||||||
|
FutureUtils.toSingleFutureGeneric(channelService.sendMessageToSendToChannel(messageToSend, message.getGuildChannel()))
|
||||||
|
.thenAccept(unused -> fileService.safeDeleteIgnoreException(messageToSend.getAttachedFiles().get(0).getFile()));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Integer getPriority() {
|
||||||
|
return ListenerPriority.LOW;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
package dev.sheldan.sissi.module.custom.imagegeneration.config;
|
||||||
|
|
||||||
|
import org.springframework.context.annotation.Configuration;
|
||||||
|
import org.springframework.context.annotation.PropertySource;
|
||||||
|
|
||||||
|
@Configuration
|
||||||
|
@PropertySource("classpath:custom-image-generation-config.properties")
|
||||||
|
public class CustomImageGenerationConfig {
|
||||||
|
}
|
||||||
|
|
||||||
@@ -0,0 +1,29 @@
|
|||||||
|
package dev.sheldan.sissi.module.custom.imagegeneration.service;
|
||||||
|
|
||||||
|
import dev.sheldan.abstracto.core.exception.AbstractoRunTimeException;
|
||||||
|
import dev.sheldan.abstracto.core.service.HttpService;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
import java.io.File;
|
||||||
|
import java.io.IOException;
|
||||||
|
|
||||||
|
@Component
|
||||||
|
public class ImageGenerationService {
|
||||||
|
|
||||||
|
@Value("${abstracto.feature.imagegeneration.doge.orangeSun.url}")
|
||||||
|
private String dogeOrangeSunUrl;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private HttpService httpService;
|
||||||
|
|
||||||
|
public File getOrangeSunDogeImage(String inputText) {
|
||||||
|
try {
|
||||||
|
return httpService.downloadFileToTempFile(dogeOrangeSunUrl.replace("{1}", inputText));
|
||||||
|
} catch (IOException e) {
|
||||||
|
throw new AbstractoRunTimeException(String.format("Failed to download orange doge image for url %s with error %s", inputText, e.getMessage()));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
abstracto.feature.imagegeneration.doge.orangeSun.url=http://${PRIVATE_REST_API_HOST}:${PRIVATE_REST_API_PORT}/memes/doge/orangeSun/?text={1}
|
||||||
@@ -3,7 +3,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>dev.sheldan.sissi.application.module.custom</groupId>
|
<groupId>dev.sheldan.sissi.application.module.custom</groupId>
|
||||||
<artifactId>sissi-customizations</artifactId>
|
<artifactId>sissi-customizations</artifactId>
|
||||||
<version>1.4.24</version>
|
<version>1.4.44-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<artifactId>application</artifactId>
|
<artifactId>application</artifactId>
|
||||||
<groupId>dev.sheldan.sissi.application</groupId>
|
<groupId>dev.sheldan.sissi.application</groupId>
|
||||||
<version>1.4.24</version>
|
<version>1.4.44-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
@@ -13,6 +13,7 @@
|
|||||||
|
|
||||||
<modules>
|
<modules>
|
||||||
<module>moderation-custom</module>
|
<module>moderation-custom</module>
|
||||||
|
<module>image-generation-custom</module>
|
||||||
</modules>
|
</modules>
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>dev.sheldan.sissi.application</groupId>
|
<groupId>dev.sheldan.sissi.application</groupId>
|
||||||
<artifactId>sissi-modules</artifactId>
|
<artifactId>sissi-modules</artifactId>
|
||||||
<version>1.4.24</version>
|
<version>1.4.44-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ public class DebraDonationStatusController {
|
|||||||
@GetMapping(value = "/latestDonations", produces = "application/json")
|
@GetMapping(value = "/latestDonations", produces = "application/json")
|
||||||
public DonationStats getLatestDonations() {
|
public DonationStats getLatestDonations() {
|
||||||
Long serverId = Long.parseLong(System.getenv(DEBRA_DONATION_NOTIFICATION_SERVER_ID_ENV_NAME));
|
Long serverId = Long.parseLong(System.getenv(DEBRA_DONATION_NOTIFICATION_SERVER_ID_ENV_NAME));
|
||||||
DonationsResponse donationResponse = donationService.getCachedDonationAmount(serverId);
|
DonationsResponse donationResponse = donationService.getSynchronizedCachedDonationAmount(serverId);
|
||||||
List<DonationInfo> donations = donationService.getLatestDonations(donationResponse, Integer.MAX_VALUE)
|
List<DonationInfo> donations = donationService.getLatestDonations(donationResponse, Integer.MAX_VALUE)
|
||||||
.stream()
|
.stream()
|
||||||
.map(DonationInfo::fromDonationItemModel)
|
.map(DonationInfo::fromDonationItemModel)
|
||||||
@@ -36,7 +36,7 @@ public class DebraDonationStatusController {
|
|||||||
@GetMapping(value = "/highestDonations", produces = "application/json")
|
@GetMapping(value = "/highestDonations", produces = "application/json")
|
||||||
public DonationStats getHighestDonations() {
|
public DonationStats getHighestDonations() {
|
||||||
Long serverId = Long.parseLong(System.getenv(DEBRA_DONATION_NOTIFICATION_SERVER_ID_ENV_NAME));
|
Long serverId = Long.parseLong(System.getenv(DEBRA_DONATION_NOTIFICATION_SERVER_ID_ENV_NAME));
|
||||||
DonationsResponse donationResponse = donationService.getCachedDonationAmount(serverId);
|
DonationsResponse donationResponse = donationService.getSynchronizedCachedDonationAmount(serverId);
|
||||||
List<DonationInfo> donations = donationService.getHighestDonations(donationResponse, Integer.MAX_VALUE)
|
List<DonationInfo> donations = donationService.getHighestDonations(donationResponse, Integer.MAX_VALUE)
|
||||||
.stream()
|
.stream()
|
||||||
.map(DonationInfo::fromDonationItemModel)
|
.map(DonationInfo::fromDonationItemModel)
|
||||||
@@ -51,7 +51,7 @@ public class DebraDonationStatusController {
|
|||||||
@GetMapping(value = "/campaignInfo", produces = "application/json")
|
@GetMapping(value = "/campaignInfo", produces = "application/json")
|
||||||
public CampaignInfo getCampaignInfo() {
|
public CampaignInfo getCampaignInfo() {
|
||||||
Long serverId = Long.parseLong(System.getenv(DEBRA_DONATION_NOTIFICATION_SERVER_ID_ENV_NAME));
|
Long serverId = Long.parseLong(System.getenv(DEBRA_DONATION_NOTIFICATION_SERVER_ID_ENV_NAME));
|
||||||
DonationsResponse donationResponse = donationService.getCachedDonationAmount(serverId);
|
DonationsResponse donationResponse = donationService.getSynchronizedCachedDonationAmount(serverId);
|
||||||
|
|
||||||
Description pageObject = donationResponse.getPage();
|
Description pageObject = donationResponse.getPage();
|
||||||
return CampaignInfo
|
return CampaignInfo
|
||||||
|
|||||||
@@ -0,0 +1,51 @@
|
|||||||
|
package dev.sheldan.sissi.module.debra.api;
|
||||||
|
|
||||||
|
import dev.sheldan.abstracto.core.service.ConfigService;
|
||||||
|
import dev.sheldan.sissi.module.debra.config.DebraFeatureConfig;
|
||||||
|
import dev.sheldan.sissi.module.debra.model.api.DonationsResponse;
|
||||||
|
import dev.sheldan.sissi.module.debra.model.api.EndlessStreamInfo;
|
||||||
|
import dev.sheldan.sissi.module.debra.model.database.EndlessStream;
|
||||||
|
import dev.sheldan.sissi.module.debra.service.DonationService;
|
||||||
|
import dev.sheldan.sissi.module.debra.service.management.EndlessStreamManagementServiceBean;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PathVariable;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.time.Instant;
|
||||||
|
import java.time.temporal.ChronoUnit;
|
||||||
|
|
||||||
|
import static dev.sheldan.sissi.module.debra.config.DebraFeatureConfig.DEBRA_DONATION_NOTIFICATION_SERVER_ID_ENV_NAME;
|
||||||
|
|
||||||
|
@RestController
|
||||||
|
@RequestMapping(value = "/stream")
|
||||||
|
public class EndlessStreamController {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private EndlessStreamManagementServiceBean endlessStreamManagementServiceBean;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private DonationService donationService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private ConfigService configService;
|
||||||
|
|
||||||
|
@GetMapping(value = "/endlessStream/{id}", produces = "application/json")
|
||||||
|
public EndlessStreamInfo getLatestDonations(@PathVariable("id") Long id) {
|
||||||
|
Long serverId = Long.parseLong(System.getenv(DEBRA_DONATION_NOTIFICATION_SERVER_ID_ENV_NAME));
|
||||||
|
EndlessStream endlessStream = endlessStreamManagementServiceBean.getEndlessStream(id);
|
||||||
|
DonationsResponse donationInfo = donationService.getSynchronizedCachedDonationAmount(serverId);
|
||||||
|
BigDecimal collectedAmount = donationInfo.getPage().getCollected();
|
||||||
|
Long minuteRate = configService.getLongValueOrConfigDefault(DebraFeatureConfig.ENDLESS_STREAM_MINUTE_RATE, serverId);
|
||||||
|
Instant endDate = endlessStream.getStartTime().plus(collectedAmount.multiply(new BigDecimal(minuteRate)).toBigInteger().longValue(), ChronoUnit.MINUTES);
|
||||||
|
return EndlessStreamInfo
|
||||||
|
.builder()
|
||||||
|
.startDate(endlessStream.getStartTime())
|
||||||
|
.endDate(endDate)
|
||||||
|
.donationAmount(collectedAmount.longValue())
|
||||||
|
.minuteRate(minuteRate)
|
||||||
|
.build();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -12,6 +12,7 @@ import java.util.List;
|
|||||||
public class DebraFeatureConfig implements FeatureConfig {
|
public class DebraFeatureConfig implements FeatureConfig {
|
||||||
|
|
||||||
public static final String DEBRA_DONATION_NOTIFICATION_DELAY_CONFIG_KEY = "debraDonationNotificationDelayMillis";
|
public static final String DEBRA_DONATION_NOTIFICATION_DELAY_CONFIG_KEY = "debraDonationNotificationDelayMillis";
|
||||||
|
public static final String ENDLESS_STREAM_MINUTE_RATE = "endlessStreamMinuteRate";
|
||||||
public static final String DEBRA_DONATION_API_FETCH_SIZE_KEY = "debraDonationApiFetchSize";
|
public static final String DEBRA_DONATION_API_FETCH_SIZE_KEY = "debraDonationApiFetchSize";
|
||||||
public static final String DEBRA_DONATION_NOTIFICATION_SERVER_ID_ENV_NAME = "DEBRA_DONATION_NOTIFICATION_SERVER_ID";
|
public static final String DEBRA_DONATION_NOTIFICATION_SERVER_ID_ENV_NAME = "DEBRA_DONATION_NOTIFICATION_SERVER_ID";
|
||||||
@Override
|
@Override
|
||||||
@@ -26,6 +27,6 @@ public class DebraFeatureConfig implements FeatureConfig {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<String> getRequiredSystemConfigKeys() {
|
public List<String> getRequiredSystemConfigKeys() {
|
||||||
return Arrays.asList(DEBRA_DONATION_NOTIFICATION_DELAY_CONFIG_KEY, DEBRA_DONATION_API_FETCH_SIZE_KEY);
|
return Arrays.asList(DEBRA_DONATION_NOTIFICATION_DELAY_CONFIG_KEY, DEBRA_DONATION_API_FETCH_SIZE_KEY, ENDLESS_STREAM_MINUTE_RATE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
package dev.sheldan.sissi.module.debra;
|
package dev.sheldan.sissi.module.debra.exception;
|
||||||
|
|
||||||
import dev.sheldan.abstracto.core.exception.AbstractoTemplatableException;
|
import dev.sheldan.abstracto.core.exception.AbstractoTemplatableException;
|
||||||
|
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
package dev.sheldan.sissi.module.debra.model.api;
|
||||||
|
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Getter;
|
||||||
|
|
||||||
|
import java.time.Instant;
|
||||||
|
|
||||||
|
@Builder
|
||||||
|
@Getter
|
||||||
|
public class EndlessStreamInfo {
|
||||||
|
private Instant endDate;
|
||||||
|
private Instant startDate;
|
||||||
|
private Long donationAmount;
|
||||||
|
private Long minuteRate;
|
||||||
|
}
|
||||||
@@ -0,0 +1,31 @@
|
|||||||
|
package dev.sheldan.sissi.module.debra.model.database;
|
||||||
|
|
||||||
|
import jakarta.persistence.*;
|
||||||
|
import lombok.*;
|
||||||
|
|
||||||
|
import java.time.Instant;
|
||||||
|
|
||||||
|
@Builder
|
||||||
|
@Entity
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
@Table(name = "endless_stream")
|
||||||
|
@Getter
|
||||||
|
@Setter
|
||||||
|
@EqualsAndHashCode
|
||||||
|
public class EndlessStream {
|
||||||
|
|
||||||
|
@Id
|
||||||
|
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||||
|
@Column(name = "id", nullable = false)
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
@Column(name = "start_time")
|
||||||
|
private Instant startTime;
|
||||||
|
|
||||||
|
@Column(name = "created")
|
||||||
|
private Instant created;
|
||||||
|
|
||||||
|
@Column(name = "updated")
|
||||||
|
private Instant updated;
|
||||||
|
}
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
package dev.sheldan.sissi.module.debra.repository;
|
||||||
|
|
||||||
|
import dev.sheldan.sissi.module.debra.model.database.EndlessStream;
|
||||||
|
import org.springframework.data.jpa.repository.JpaRepository;
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
@Repository
|
||||||
|
public interface EndlessStreamRepository extends JpaRepository<EndlessStream, Long> {
|
||||||
|
}
|
||||||
@@ -1,18 +0,0 @@
|
|||||||
package dev.sheldan.sissi.module.debra.service;
|
|
||||||
|
|
||||||
import org.springframework.beans.factory.InitializingBean;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.cache.CacheManager;
|
|
||||||
import org.springframework.stereotype.Component;
|
|
||||||
|
|
||||||
@Component
|
|
||||||
public class DonationCacheService implements InitializingBean {
|
|
||||||
|
|
||||||
@Autowired
|
|
||||||
private CacheManager cacheManager;
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void afterPropertiesSet() throws Exception {
|
|
||||||
cacheManager.getCache("donations");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -13,7 +13,7 @@ import dev.sheldan.abstracto.core.service.management.ServerManagementService;
|
|||||||
import dev.sheldan.abstracto.core.templating.model.MessageToSend;
|
import dev.sheldan.abstracto.core.templating.model.MessageToSend;
|
||||||
import dev.sheldan.abstracto.core.templating.service.TemplateService;
|
import dev.sheldan.abstracto.core.templating.service.TemplateService;
|
||||||
import dev.sheldan.abstracto.core.utils.FutureUtils;
|
import dev.sheldan.abstracto.core.utils.FutureUtils;
|
||||||
import dev.sheldan.sissi.module.debra.DonationAmountNotFoundException;
|
import dev.sheldan.sissi.module.debra.exception.DonationAmountNotFoundException;
|
||||||
import dev.sheldan.sissi.module.debra.config.DebraPostTarget;
|
import dev.sheldan.sissi.module.debra.config.DebraPostTarget;
|
||||||
import dev.sheldan.sissi.module.debra.config.DebraProperties;
|
import dev.sheldan.sissi.module.debra.config.DebraProperties;
|
||||||
import dev.sheldan.sissi.module.debra.converter.DonationConverter;
|
import dev.sheldan.sissi.module.debra.converter.DonationConverter;
|
||||||
@@ -134,9 +134,13 @@ public class DonationService {
|
|||||||
.collect(Collectors.toList());
|
.collect(Collectors.toList());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public synchronized DonationsResponse getSynchronizedCachedDonationAmount(Long serverId) {
|
||||||
|
return self.getCachedDonationAmount(serverId);
|
||||||
|
}
|
||||||
|
|
||||||
@Cacheable(value = "donation-cache")
|
@Cacheable(value = "donation-cache")
|
||||||
public DonationsResponse getCachedDonationAmount(Long serverId) {
|
public synchronized DonationsResponse getCachedDonationAmount(Long serverId) {
|
||||||
return fetchCurrentDonationAmount(serverId);
|
return self.fetchCurrentDonationAmount(serverId);
|
||||||
}
|
}
|
||||||
|
|
||||||
public DonationsResponse fetchCurrentDonationAmount(Long serverId) {
|
public DonationsResponse fetchCurrentDonationAmount(Long serverId) {
|
||||||
@@ -148,10 +152,8 @@ public class DonationService {
|
|||||||
.build();
|
.build();
|
||||||
Response response = okHttpClient.newCall(request).execute();
|
Response response = okHttpClient.newCall(request).execute();
|
||||||
if(!response.isSuccessful()) {
|
if(!response.isSuccessful()) {
|
||||||
if (log.isDebugEnabled()) {
|
log.error("Failed to retrieve donation response. Response had code {} with body {} and headers {}.",
|
||||||
log.error("Failed to retrieve donation response. Response had code {} with body {}.",
|
response.code(), response.body().string(), response.headers());
|
||||||
response.code(), response.body());
|
|
||||||
}
|
|
||||||
throw new DonationAmountNotFoundException();
|
throw new DonationAmountNotFoundException();
|
||||||
}
|
}
|
||||||
Gson gson = getGson();
|
Gson gson = getGson();
|
||||||
|
|||||||
@@ -0,0 +1,17 @@
|
|||||||
|
package dev.sheldan.sissi.module.debra.service.management;
|
||||||
|
|
||||||
|
import dev.sheldan.sissi.module.debra.model.database.EndlessStream;
|
||||||
|
import dev.sheldan.sissi.module.debra.repository.EndlessStreamRepository;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
@Component
|
||||||
|
public class EndlessStreamManagementServiceBean {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private EndlessStreamRepository endlessStreamRepository;
|
||||||
|
|
||||||
|
public EndlessStream getEndlessStream(Long id) {
|
||||||
|
return endlessStreamRepository.getReferenceById(id);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -10,5 +10,8 @@ sissi.debra.donationAPIUrl=https://www.altruja.de/api/page/discord-gg-austria-fu
|
|||||||
abstracto.systemConfigs.debraDonationNotificationDelayMillis.name=debraDonationNotificationDelayMillis
|
abstracto.systemConfigs.debraDonationNotificationDelayMillis.name=debraDonationNotificationDelayMillis
|
||||||
abstracto.systemConfigs.debraDonationNotificationDelayMillis.longValue=60000
|
abstracto.systemConfigs.debraDonationNotificationDelayMillis.longValue=60000
|
||||||
|
|
||||||
|
abstracto.systemConfigs.endlessStreamMinuteRate.name=endlessStreamMinuteRate
|
||||||
|
abstracto.systemConfigs.endlessStreamMinuteRate.longValue=1
|
||||||
|
|
||||||
abstracto.systemConfigs.debraDonationApiFetchSize.name=debraDonationApiFetchSize
|
abstracto.systemConfigs.debraDonationApiFetchSize.name=debraDonationApiFetchSize
|
||||||
abstracto.systemConfigs.debraDonationApiFetchSize.longValue=1000
|
abstracto.systemConfigs.debraDonationApiFetchSize.longValue=1000
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
<?xml version="1.1" encoding="UTF-8" standalone="no"?>
|
||||||
|
<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
|
||||||
|
xmlns:ext="http://www.liquibase.org/xml/ns/dbchangelog-ext"
|
||||||
|
xmlns:pro="http://www.liquibase.org/xml/ns/pro"
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog dbchangelog.xsd
|
||||||
|
http://www.liquibase.org/xml/ns/dbchangelog-ext dbchangelog.xsd
|
||||||
|
http://www.liquibase.org/xml/ns/pro dbchangelog.xsd" >
|
||||||
|
<include file="tables/tables.xml" relativeToChangelogFile="true"/>
|
||||||
|
</databaseChangeLog>
|
||||||
@@ -0,0 +1,32 @@
|
|||||||
|
<?xml version="1.1" encoding="UTF-8" standalone="no"?>
|
||||||
|
<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
|
||||||
|
xmlns:ext="http://www.liquibase.org/xml/ns/dbchangelog-ext"
|
||||||
|
xmlns:pro="http://www.liquibase.org/xml/ns/pro"
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog dbchangelog.xsd
|
||||||
|
http://www.liquibase.org/xml/ns/dbchangelog-ext dbchangelog.xsd
|
||||||
|
http://www.liquibase.org/xml/ns/pro dbchangelog.xsd" >
|
||||||
|
<changeSet author="Sheldan" id="endless_stream-table">
|
||||||
|
<createTable tableName="endless_stream">
|
||||||
|
<column name="id" autoIncrement="true" type="BIGINT">
|
||||||
|
<constraints nullable="false"/>
|
||||||
|
</column>
|
||||||
|
<column name="start_time" type="TIMESTAMP WITHOUT TIME ZONE">
|
||||||
|
<constraints nullable="false"/>
|
||||||
|
</column>
|
||||||
|
<column name="created" type="TIMESTAMP WITHOUT TIME ZONE">
|
||||||
|
<constraints nullable="false"/>
|
||||||
|
</column>
|
||||||
|
<column name="updated" type="TIMESTAMP WITHOUT TIME ZONE"/>
|
||||||
|
</createTable>
|
||||||
|
<sql>
|
||||||
|
DROP TRIGGER IF EXISTS endless_stream_update_trigger ON endless_stream;
|
||||||
|
CREATE TRIGGER endless_stream_update_trigger BEFORE UPDATE ON endless_stream FOR EACH ROW EXECUTE PROCEDURE update_trigger_procedure();
|
||||||
|
</sql>
|
||||||
|
<sql>
|
||||||
|
DROP TRIGGER IF EXISTS endless_stream_insert_trigger ON endless_stream;
|
||||||
|
CREATE TRIGGER endless_stream_insert_trigger BEFORE INSERT ON endless_stream FOR EACH ROW EXECUTE PROCEDURE insert_trigger_procedure();
|
||||||
|
</sql>
|
||||||
|
</changeSet>
|
||||||
|
|
||||||
|
</databaseChangeLog>
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
<?xml version="1.1" encoding="UTF-8" standalone="no"?>
|
||||||
|
<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
|
||||||
|
xmlns:ext="http://www.liquibase.org/xml/ns/dbchangelog-ext"
|
||||||
|
xmlns:pro="http://www.liquibase.org/xml/ns/pro"
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog dbchangelog.xsd
|
||||||
|
http://www.liquibase.org/xml/ns/dbchangelog-ext dbchangelog.xsd
|
||||||
|
http://www.liquibase.org/xml/ns/pro dbchangelog.xsd" >
|
||||||
|
<include file="endless_stream.xml" relativeToChangelogFile="true"/>
|
||||||
|
</databaseChangeLog>
|
||||||
@@ -8,4 +8,5 @@
|
|||||||
http://www.liquibase.org/xml/ns/pro dbchangelog.xsd" >
|
http://www.liquibase.org/xml/ns/pro dbchangelog.xsd" >
|
||||||
<include file="1.3.6/collection.xml" relativeToChangelogFile="true"/>
|
<include file="1.3.6/collection.xml" relativeToChangelogFile="true"/>
|
||||||
<include file="1.4.21/collection.xml" relativeToChangelogFile="true"/>
|
<include file="1.4.21/collection.xml" relativeToChangelogFile="true"/>
|
||||||
|
<include file="1.4.29/collection.xml" relativeToChangelogFile="true"/>
|
||||||
</databaseChangeLog>
|
</databaseChangeLog>
|
||||||
@@ -3,7 +3,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>dev.sheldan.sissi.application</groupId>
|
<groupId>dev.sheldan.sissi.application</groupId>
|
||||||
<artifactId>sissi-modules</artifactId>
|
<artifactId>sissi-modules</artifactId>
|
||||||
<version>1.4.24</version>
|
<version>1.4.44-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>dev.sheldan.sissi.application</groupId>
|
<groupId>dev.sheldan.sissi.application</groupId>
|
||||||
<artifactId>application</artifactId>
|
<artifactId>application</artifactId>
|
||||||
<version>1.4.24</version>
|
<version>1.4.44-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>dev.sheldan.sissi.application</groupId>
|
<groupId>dev.sheldan.sissi.application</groupId>
|
||||||
<artifactId>sissi-modules</artifactId>
|
<artifactId>sissi-modules</artifactId>
|
||||||
<version>1.4.24</version>
|
<version>1.4.44-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<artifactId>sissi-modules</artifactId>
|
<artifactId>sissi-modules</artifactId>
|
||||||
<groupId>dev.sheldan.sissi.application</groupId>
|
<groupId>dev.sheldan.sissi.application</groupId>
|
||||||
<version>1.4.24</version>
|
<version>1.4.44-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
|||||||
@@ -1,24 +1,5 @@
|
|||||||
apiVersion: v2
|
apiVersion: v2
|
||||||
name: sissi
|
name: sissi
|
||||||
description: A Helm chart for Kubernetes
|
description: A Helm chart for Kubernetes
|
||||||
|
|
||||||
# A chart can be either an 'application' or a 'library' chart.
|
|
||||||
#
|
|
||||||
# Application charts are a collection of templates that can be packaged into versioned archives
|
|
||||||
# to be deployed.
|
|
||||||
#
|
|
||||||
# Library charts provide useful utilities or functions for the chart developer. They're included as
|
|
||||||
# a dependency of application charts to inject those utilities and functions into the rendering
|
|
||||||
# pipeline. Library charts do not define any templates and therefore cannot be deployed.
|
|
||||||
type: application
|
type: application
|
||||||
|
version: 1.4.43
|
||||||
# This is the chart version. This version number should be incremented each time you make changes
|
|
||||||
# to the chart and its templates, including the app version.
|
|
||||||
# Versions are expected to follow Semantic Versioning (https://semver.org/)
|
|
||||||
version: 1.4.24
|
|
||||||
|
|
||||||
# This is the version number of the application being deployed. This version number should be
|
|
||||||
# incremented each time you make changes to the application. Versions are not expected to
|
|
||||||
# follow Semantic Versioning. They should reflect the version the application is using.
|
|
||||||
# It is recommended to use it with quotes.
|
|
||||||
appVersion: "1.4.24"
|
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ spec:
|
|||||||
{{- end }}
|
{{- end }}
|
||||||
containers:
|
containers:
|
||||||
- name: db-config-deployment-job
|
- name: db-config-deployment-job
|
||||||
image: "{{ $.Values.dbConfigDeployment.repository }}/{{ $.Values.dbConfigDeployment.image }}:{{ $.Values.dbConfigDeployment.tag | default .Chart.AppVersion}}"
|
image: "{{ $.Values.dbConfigDeployment.repository }}/{{ $.Values.dbConfigDeployment.image }}:{{ $.Values.dbConfigDeployment.tag | default .Chart.Version }}"
|
||||||
imagePullPolicy: {{ $.Values.dbConfigDeployment.pullPolicy }}
|
imagePullPolicy: {{ $.Values.dbConfigDeployment.pullPolicy }}
|
||||||
args:
|
args:
|
||||||
- "/var/db-config/"
|
- "/var/db-config/"
|
||||||
@@ -48,7 +48,7 @@ spec:
|
|||||||
name: db-credentials
|
name: db-credentials
|
||||||
key: dbName
|
key: dbName
|
||||||
- name: DB_SCHEME
|
- name: DB_SCHEME
|
||||||
value: "abstracto"
|
value: {{ .Values.dbCredentials.schema }}
|
||||||
volumeMounts:
|
volumeMounts:
|
||||||
- mountPath: "/var/db-config/"
|
- mountPath: "/var/db-config/"
|
||||||
name: database-config-mount
|
name: database-config-mount
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ spec:
|
|||||||
- name: {{ .Chart.Name }}
|
- name: {{ .Chart.Name }}
|
||||||
securityContext:
|
securityContext:
|
||||||
{{- toYaml .Values.securityContext | nindent 12 }}
|
{{- toYaml .Values.securityContext | nindent 12 }}
|
||||||
image: "{{ .Values.bot.repository }}/{{ .Values.bot.image }}:{{ .Values.bot.tag | default .Chart.AppVersion }}"
|
image: "{{ .Values.bot.repository }}/{{ .Values.bot.image }}:{{ .Values.bot.tag | default .Chart.Version }}"
|
||||||
imagePullPolicy: {{ .Values.bot.pullPolicy }}
|
imagePullPolicy: {{ .Values.bot.pullPolicy }}
|
||||||
env:
|
env:
|
||||||
- name: DB_PASS
|
- name: DB_PASS
|
||||||
@@ -57,6 +57,8 @@ spec:
|
|||||||
secretKeyRef:
|
secretKeyRef:
|
||||||
name: db-credentials
|
name: db-credentials
|
||||||
key: dbName
|
key: dbName
|
||||||
|
- name: DB_SCHEMA
|
||||||
|
value: {{ .Values.dbCredentials.schema }}
|
||||||
- name: DEBRA_DONATION_NOTIFICATION_SERVER_ID
|
- name: DEBRA_DONATION_NOTIFICATION_SERVER_ID
|
||||||
value: "297910194841583616"
|
value: "297910194841583616"
|
||||||
- name: TOKEN
|
- name: TOKEN
|
||||||
@@ -84,6 +86,10 @@ spec:
|
|||||||
secretKeyRef:
|
secretKeyRef:
|
||||||
name: api-keys
|
name: api-keys
|
||||||
key: twitchSecret
|
key: twitchSecret
|
||||||
|
- name: PRIVATE_REST_API_HOST
|
||||||
|
value: "{{ .Values.privateRestApi.service.name }}.{{ .Release.Namespace }}.svc.cluster.local"
|
||||||
|
- name: PRIVATE_REST_API_PORT
|
||||||
|
value: "{{ .Values.privateRestApi.service.targetPort }}"
|
||||||
{{- range $key, $value := .Values.bot.propertyConfig }}
|
{{- range $key, $value := .Values.bot.propertyConfig }}
|
||||||
- name: {{ $key | quote }}
|
- name: {{ $key | quote }}
|
||||||
value: {{ $value | quote}}
|
value: {{ $value | quote}}
|
||||||
|
|||||||
@@ -0,0 +1,70 @@
|
|||||||
|
{{- if .Values.privateRestApi.enabled -}}
|
||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: {{ include "sissi.fullname" . }}-private-rest-api
|
||||||
|
spec:
|
||||||
|
replicas: 1
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: private-rest-api
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
{{- with .Values.privateRestApi.podAnnotations }}
|
||||||
|
annotations:
|
||||||
|
{{- toYaml . | nindent 8 }}
|
||||||
|
{{- end }}
|
||||||
|
labels:
|
||||||
|
app: private-rest-api
|
||||||
|
spec:
|
||||||
|
{{- with .Values.imagePullSecrets }}
|
||||||
|
imagePullSecrets:
|
||||||
|
{{- toYaml . | nindent 8 }}
|
||||||
|
{{- end }}
|
||||||
|
serviceAccountName: {{ include "sissi.serviceAccountName" . }}
|
||||||
|
securityContext:
|
||||||
|
{{- toYaml .Values.privateRestApi.podSecurityContext | nindent 8 }}
|
||||||
|
containers:
|
||||||
|
- name: {{ .Chart.Name }}-private-rest-api
|
||||||
|
securityContext:
|
||||||
|
{{- toYaml .Values.privateRestApi.securityContext | nindent 12 }}
|
||||||
|
image: "{{ .Values.privateRestApi.repository }}/{{ .Values.privateRestApi.image }}:{{ .Values.privateRestApi.tag | default .Chart.AppVersion }}"
|
||||||
|
imagePullPolicy: {{ .Values.privateRestApi.pullPolicy }}
|
||||||
|
env:
|
||||||
|
- name: SISSI_HOST
|
||||||
|
value: "{{ include "sissi.fullname" . }}.{{ .Release.Namespace }}.svc.cluster.local"
|
||||||
|
- name: SISSI_PORT
|
||||||
|
value: "{{ .Values.service.port }}"
|
||||||
|
ports:
|
||||||
|
- name: {{ .Values.privateRestApi.service.name }}
|
||||||
|
containerPort: {{ .Values.privateRestApi.service.port }}
|
||||||
|
protocol: TCP
|
||||||
|
livenessProbe:
|
||||||
|
httpGet:
|
||||||
|
path: /
|
||||||
|
port: {{ .Values.privateRestApi.service.port }}
|
||||||
|
initialDelaySeconds: {{ $.Values.privateRestApi.livenessProbe.initialDelaySeconds }}
|
||||||
|
periodSeconds: {{ $.Values.privateRestApi.livenessProbe.periodSeconds }}
|
||||||
|
failureThreshold: {{ $.Values.privateRestApi.livenessProbe.failureThreshold }}
|
||||||
|
readinessProbe:
|
||||||
|
httpGet:
|
||||||
|
path: /
|
||||||
|
port: {{ .Values.privateRestApi.service.port }}
|
||||||
|
initialDelaySeconds: {{ $.Values.privateRestApi.readinessProbe.initialDelaySeconds }}
|
||||||
|
periodSeconds: {{ $.Values.privateRestApi.readinessProbe.periodSeconds }}
|
||||||
|
failureThreshold: {{ $.Values.privateRestApi.readinessProbe.failureThreshold }}
|
||||||
|
resources:
|
||||||
|
{{- toYaml .Values.privateRestApi.resources | nindent 12 }}
|
||||||
|
{{- with .Values.privateRestApi.nodeSelector }}
|
||||||
|
nodeSelector:
|
||||||
|
{{- toYaml . | nindent 8 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- with .Values.privateRestApi.affinity }}
|
||||||
|
affinity:
|
||||||
|
{{- toYaml . | nindent 8 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- with .Values.privateRestApi.tolerations }}
|
||||||
|
tolerations:
|
||||||
|
{{- toYaml . | nindent 8 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
{{- if .Values.privateRestApi.enabled -}}
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: {{ .Values.privateRestApi.service.name }}
|
||||||
|
spec:
|
||||||
|
selector:
|
||||||
|
app: private-rest-api
|
||||||
|
ports:
|
||||||
|
- port: {{ .Values.privateRestApi.service.targetPort }}
|
||||||
|
targetPort: {{ .Values.privateRestApi.service.port }}
|
||||||
|
{{- end }}
|
||||||
@@ -25,7 +25,7 @@ spec:
|
|||||||
securityContext:
|
securityContext:
|
||||||
{{- toYaml .Values.restApi.podSecurityContext | nindent 8 }}
|
{{- toYaml .Values.restApi.podSecurityContext | nindent 8 }}
|
||||||
containers:
|
containers:
|
||||||
- name: {{ .Chart.Name }}
|
- name: {{ .Chart.Name }}-rest-api
|
||||||
securityContext:
|
securityContext:
|
||||||
{{- toYaml .Values.restApi.securityContext | nindent 12 }}
|
{{- toYaml .Values.restApi.securityContext | nindent 12 }}
|
||||||
image: "{{ .Values.restApi.repository }}/{{ .Values.restApi.image }}:{{ .Values.restApi.tag | default .Chart.AppVersion }}"
|
image: "{{ .Values.restApi.repository }}/{{ .Values.restApi.image }}:{{ .Values.restApi.tag | default .Chart.AppVersion }}"
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ spec:
|
|||||||
{{- end }}
|
{{- end }}
|
||||||
containers:
|
containers:
|
||||||
- name: template-deployment-job
|
- name: template-deployment-job
|
||||||
image: "{{ $.Values.templateDeployment.repository }}/{{ $.Values.templateDeployment.image }}:{{ $.Values.templateDeployment.tag | default .Chart.AppVersion }}"
|
image: "{{ $.Values.templateDeployment.repository }}/{{ $.Values.templateDeployment.image }}:{{ $.Values.templateDeployment.tag | default .Chart.Version }}"
|
||||||
imagePullPolicy: {{ $.Values.templateDeployment.pullPolicy }}
|
imagePullPolicy: {{ $.Values.templateDeployment.pullPolicy }}
|
||||||
args:
|
args:
|
||||||
- "/var/template-config/"
|
- "/var/template-config/"
|
||||||
@@ -48,7 +48,7 @@ spec:
|
|||||||
name: db-credentials
|
name: db-credentials
|
||||||
key: dbName
|
key: dbName
|
||||||
- name: DB_SCHEME
|
- name: DB_SCHEME
|
||||||
value: "abstracto."
|
value: "{{ .Values.dbCredentials.schema }}."
|
||||||
volumeMounts:
|
volumeMounts:
|
||||||
- mountPath: "/var/template-config/"
|
- mountPath: "/var/template-config/"
|
||||||
name: template-config-mount
|
name: template-config-mount
|
||||||
|
|||||||
@@ -1,14 +1,9 @@
|
|||||||
# Default values for sissi.
|
|
||||||
# This is a YAML-formatted file.
|
|
||||||
# Declare variables to be passed into your templates.
|
|
||||||
|
|
||||||
replicaCount: 1
|
replicaCount: 1
|
||||||
|
|
||||||
bot:
|
bot:
|
||||||
repository: harbor.sheldan.dev/sissi
|
repository: harbor.sheldan.dev/sissi
|
||||||
pullPolicy: IfNotPresent
|
pullPolicy: Always
|
||||||
image: sissi-bot
|
image: sissi-bot
|
||||||
tag: 1.4.24
|
tag: 1.4.43
|
||||||
livenessProbe:
|
livenessProbe:
|
||||||
initialDelaySeconds: 60
|
initialDelaySeconds: 60
|
||||||
periodSeconds: 5
|
periodSeconds: 5
|
||||||
@@ -19,13 +14,12 @@ bot:
|
|||||||
failureThreshold: 3
|
failureThreshold: 3
|
||||||
propertyConfig:
|
propertyConfig:
|
||||||
hikariPoolSize: 10
|
hikariPoolSize: 10
|
||||||
|
|
||||||
restApi:
|
restApi:
|
||||||
enabled: true
|
enabled: true
|
||||||
repository: harbor.sheldan.dev/sissi
|
repository: harbor.sheldan.dev/sissi
|
||||||
pullPolicy: IfNotPresent
|
pullPolicy: Always
|
||||||
image: sissi-rest-api
|
image: sissi-rest-api
|
||||||
tag: 1.4.24
|
tag: 1.4.43
|
||||||
podAnnotations: {}
|
podAnnotations: {}
|
||||||
podSecurityContext: {}
|
podSecurityContext: {}
|
||||||
securityContext: {}
|
securityContext: {}
|
||||||
@@ -43,11 +37,11 @@ restApi:
|
|||||||
name: rest-api
|
name: rest-api
|
||||||
resources:
|
resources:
|
||||||
limits:
|
limits:
|
||||||
cpu:
|
cpu: null
|
||||||
memory:
|
memory: null
|
||||||
requests:
|
requests:
|
||||||
cpu:
|
cpu: null
|
||||||
memory:
|
memory: null
|
||||||
nodeSelector: {}
|
nodeSelector: {}
|
||||||
tolerations: []
|
tolerations: []
|
||||||
affinity: {}
|
affinity: {}
|
||||||
@@ -56,46 +50,70 @@ restApi:
|
|||||||
annotations: {}
|
annotations: {}
|
||||||
labels: {}
|
labels: {}
|
||||||
path: /
|
path: /
|
||||||
|
|
||||||
pathType: Prefix
|
pathType: Prefix
|
||||||
|
hosts: null
|
||||||
hosts:
|
|
||||||
extraPaths: []
|
extraPaths: []
|
||||||
tls: []
|
tls: []
|
||||||
|
privateRestApi:
|
||||||
|
enabled: true
|
||||||
|
repository: harbor.sheldan.dev/sissi
|
||||||
|
pullPolicy: Always
|
||||||
|
image: sissi-private-rest-api
|
||||||
|
tag: 1.4.43
|
||||||
|
podAnnotations: {}
|
||||||
|
podSecurityContext: {}
|
||||||
|
securityContext: {}
|
||||||
|
livenessProbe:
|
||||||
|
initialDelaySeconds: 2
|
||||||
|
periodSeconds: 5
|
||||||
|
failureThreshold: 3
|
||||||
|
readinessProbe:
|
||||||
|
initialDelaySeconds: 2
|
||||||
|
periodSeconds: 5
|
||||||
|
failureThreshold: 3
|
||||||
|
service:
|
||||||
|
port: 8080
|
||||||
|
targetPort: 80
|
||||||
|
name: private-restapi
|
||||||
|
resources:
|
||||||
|
limits:
|
||||||
|
cpu: null
|
||||||
|
memory: null
|
||||||
|
requests:
|
||||||
|
cpu: null
|
||||||
|
memory: null
|
||||||
|
nodeSelector: {}
|
||||||
|
tolerations: []
|
||||||
|
affinity: {}
|
||||||
templateDeployment:
|
templateDeployment:
|
||||||
enabled: true
|
enabled: true
|
||||||
repository: harbor.sheldan.dev/abstracto
|
repository: harbor.sheldan.dev/abstracto
|
||||||
pullPolicy: Always
|
pullPolicy: Always
|
||||||
image: abstracto-template-deployment
|
image: abstracto-template-deployment
|
||||||
tag: 1.5.12
|
tag: 1.5.24
|
||||||
|
|
||||||
templateDeploymentData:
|
templateDeploymentData:
|
||||||
repository: harbor.sheldan.dev/sissi
|
repository: harbor.sheldan.dev/sissi
|
||||||
pullPolicy: Always
|
pullPolicy: Always
|
||||||
image: sissi-template-data
|
image: sissi-template-data
|
||||||
tag: 1.4.24
|
tag: 1.4.43
|
||||||
|
|
||||||
dbConfigDeployment:
|
dbConfigDeployment:
|
||||||
enabled: true
|
enabled: true
|
||||||
repository: harbor.sheldan.dev/abstracto
|
repository: harbor.sheldan.dev/abstracto
|
||||||
pullPolicy: Always
|
pullPolicy: Always
|
||||||
image: abstracto-db-deployment
|
image: abstracto-db-deployment
|
||||||
tag: 1.5.12
|
tag: 1.5.24
|
||||||
|
|
||||||
dbConfigDeploymentData:
|
dbConfigDeploymentData:
|
||||||
repository: harbor.sheldan.dev/sissi
|
repository: harbor.sheldan.dev/sissi
|
||||||
pullPolicy: Always
|
pullPolicy: Always
|
||||||
image: sissi-db-data
|
image: sissi-db-data
|
||||||
tag: 1.4.24
|
tag: 1.4.43
|
||||||
|
|
||||||
dbCredentials:
|
dbCredentials:
|
||||||
host:
|
host: null
|
||||||
port:
|
port: null
|
||||||
userName:
|
userName: null
|
||||||
password:
|
password: null
|
||||||
name:
|
name: null
|
||||||
|
schema: abstracto
|
||||||
grafanaDeployment:
|
grafanaDeployment:
|
||||||
repository: harbor.sheldan.dev/grafana-tools
|
repository: harbor.sheldan.dev/grafana-tools
|
||||||
pullPolicy: Always
|
pullPolicy: Always
|
||||||
@@ -103,68 +121,44 @@ grafanaDeployment:
|
|||||||
tag: 0.0.2
|
tag: 0.0.2
|
||||||
enabled: true
|
enabled: true
|
||||||
grafana:
|
grafana:
|
||||||
host:
|
host: null
|
||||||
basicAuth:
|
basicAuth:
|
||||||
username:
|
username: null
|
||||||
password:
|
password: null
|
||||||
|
|
||||||
apiKeys:
|
apiKeys:
|
||||||
discord:
|
discord:
|
||||||
token:
|
token: null
|
||||||
youtube:
|
youtube:
|
||||||
apiKey:
|
apiKey: null
|
||||||
openWeatherMap:
|
openWeatherMap:
|
||||||
apiKey:
|
apiKey: null
|
||||||
twitch:
|
twitch:
|
||||||
secret:
|
secret: null
|
||||||
clientId:
|
clientId: null
|
||||||
|
imagePullSecrets: null
|
||||||
|
nameOverride: ''
|
||||||
imagePullSecrets:
|
fullnameOverride: ''
|
||||||
nameOverride: ""
|
|
||||||
fullnameOverride: ""
|
|
||||||
|
|
||||||
serviceAccount:
|
serviceAccount:
|
||||||
# Specifies whether a service account should be created
|
|
||||||
create: true
|
create: true
|
||||||
# Annotations to add to the service account
|
|
||||||
annotations: {}
|
annotations: {}
|
||||||
# The name of the service account to use.
|
name: ''
|
||||||
# If not set and create is true, a name is generated using the fullname template
|
|
||||||
name: ""
|
|
||||||
|
|
||||||
podAnnotations: {}
|
podAnnotations: {}
|
||||||
|
|
||||||
podSecurityContext: {}
|
podSecurityContext: {}
|
||||||
# fsGroup: 2000
|
|
||||||
|
|
||||||
securityContext: {}
|
securityContext: {}
|
||||||
# capabilities:
|
|
||||||
# drop:
|
|
||||||
# - ALL
|
|
||||||
# readOnlyRootFilesystem: true
|
|
||||||
# runAsNonRoot: true
|
|
||||||
# runAsUser: 1000
|
|
||||||
|
|
||||||
service:
|
service:
|
||||||
type: ClusterIP
|
type: ClusterIP
|
||||||
port: 8080
|
port: 8080
|
||||||
annotations:
|
annotations:
|
||||||
prometheus.io/scrape: "true"
|
prometheus.io/scrape: 'true'
|
||||||
prometheus.io/path: "/actuator/prometheus"
|
prometheus.io/path: /actuator/prometheus
|
||||||
prometheus.io/port: "8080"
|
prometheus.io/port: '8080'
|
||||||
|
|
||||||
resources:
|
resources:
|
||||||
limits:
|
limits:
|
||||||
cpu:
|
cpu: null
|
||||||
memory:
|
memory: null
|
||||||
requests:
|
requests:
|
||||||
cpu:
|
cpu: null
|
||||||
memory:
|
memory: null
|
||||||
|
|
||||||
|
|
||||||
nodeSelector: {}
|
nodeSelector: {}
|
||||||
|
|
||||||
tolerations: []
|
tolerations: []
|
||||||
|
|
||||||
affinity: {}
|
affinity: {}
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -1,2 +0,0 @@
|
|||||||
REGISTRY_PREFIX=harbor.sheldan.dev/sissi/
|
|
||||||
VERSION=1.4.24
|
|
||||||
@@ -8,6 +8,8 @@
|
|||||||
{ "zip": "statistic", "file": "statistic-changeLog.xml"},
|
{ "zip": "statistic", "file": "statistic-changeLog.xml"},
|
||||||
{ "zip": "starboard", "file": "starboard-changeLog.xml"},
|
{ "zip": "starboard", "file": "starboard-changeLog.xml"},
|
||||||
{ "zip": "quotes", "file": "quotes-changeLog.xml"},
|
{ "zip": "quotes", "file": "quotes-changeLog.xml"},
|
||||||
|
{ "zip": "giveaway", "file": "giveaway-changeLog.xml"},
|
||||||
|
{ "zip": "image-generation", "file": "imageGeneration-changeLog.xml"},
|
||||||
{ "zip": "meetup", "file": "meetup-changeLog.xml"},
|
{ "zip": "meetup", "file": "meetup-changeLog.xml"},
|
||||||
{ "zip": "rss-news", "file": "rssNews-changeLog.xml"},
|
{ "zip": "rss-news", "file": "rssNews-changeLog.xml"},
|
||||||
{ "zip": "debra", "file": "debra-changeLog.xml"},
|
{ "zip": "debra", "file": "debra-changeLog.xml"},
|
||||||
@@ -19,6 +21,7 @@
|
|||||||
{ "zip": "remind", "file": "remind-changeLog.xml"},
|
{ "zip": "remind", "file": "remind-changeLog.xml"},
|
||||||
{ "zip": "suggestion", "file": "suggestion-changeLog.xml"},
|
{ "zip": "suggestion", "file": "suggestion-changeLog.xml"},
|
||||||
{ "zip": "modmail", "file": "modMail-changeLog.xml"},
|
{ "zip": "modmail", "file": "modMail-changeLog.xml"},
|
||||||
|
{ "zip": "sticky-roles", "file": "stickyRoles-changeLog.xml"},
|
||||||
{ "zip": "twitch", "file": "twitch-changeLog.xml"},
|
{ "zip": "twitch", "file": "twitch-changeLog.xml"},
|
||||||
{ "zip": "assignable-roles", "file": "assignableRoles-changeLog.xml"},
|
{ "zip": "assignable-roles", "file": "assignableRoles-changeLog.xml"},
|
||||||
{ "zip": "moderation-custom", "file": "moderation-custom-changeLog.xml"}
|
{ "zip": "moderation-custom", "file": "moderation-custom-changeLog.xml"}
|
||||||
|
|||||||
@@ -1,19 +0,0 @@
|
|||||||
version: "3.7"
|
|
||||||
|
|
||||||
services:
|
|
||||||
bot:
|
|
||||||
build:
|
|
||||||
context: sissi
|
|
||||||
image: ${REGISTRY_PREFIX}sissi-bot:${VERSION:-latest}
|
|
||||||
rest-api:
|
|
||||||
build:
|
|
||||||
context: rest-api
|
|
||||||
image: ${REGISTRY_PREFIX}sissi-rest-api:${VERSION:-latest}
|
|
||||||
db-data:
|
|
||||||
build:
|
|
||||||
context: db-data
|
|
||||||
image: ${REGISTRY_PREFIX}sissi-db-data:${VERSION:-latest}
|
|
||||||
template-data:
|
|
||||||
build:
|
|
||||||
context: template-data
|
|
||||||
image: ${REGISTRY_PREFIX}sissi-template-data:${VERSION:-latest}
|
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
ARG REGISTRY_PREFIX
|
||||||
|
ARG SISSI_REGISTRY_PREFIX
|
||||||
|
ARG VERSION
|
||||||
|
ARG ABSTRACTO_VERSION
|
||||||
|
FROM ${REGISTRY_PREFIX}abstracto-rest-api-image-gen:${ABSTRACTO_VERSION:-latest} AS image-gen-api
|
||||||
|
|
||||||
|
FROM ${SISSI_REGISTRY_PREFIX}sissi-image-gen-api:${VERSION:-latest} AS sissi-image-gen-api
|
||||||
|
|
||||||
|
FROM ${REGISTRY_PREFIX}abstracto-rest-api:${ABSTRACTO_VERSION:-latest} AS running-image
|
||||||
|
COPY --from=image-gen-api /python /python
|
||||||
|
COPY --from=sissi-image-gen-api /python /python
|
||||||
@@ -1,9 +1,9 @@
|
|||||||
FROM python:3.10.13-alpine3.18
|
ARG REGISTRY_PREFIX
|
||||||
ADD requirements.txt /
|
ARG SISSI_REGISTRY_PREFIX
|
||||||
RUN pip install -r requirements.txt
|
ARG VERSION
|
||||||
RUN apk --no-cache add msttcorefonts-installer fontconfig && \
|
ARG ABSTRACTO_VERSION
|
||||||
update-ms-fonts && \
|
FROM ${SISSI_REGISTRY_PREFIX}sissi-debra-rest-api:${VERSION:-latest} AS debra-api
|
||||||
fc-cache -f
|
|
||||||
ADD wrapper /
|
|
||||||
ADD python /python
|
FROM ${REGISTRY_PREFIX}abstracto-rest-api:${ABSTRACTO_VERSION:-latest}
|
||||||
CMD ["/run.sh"]
|
COPY --from=debra-api /python /python
|
||||||
@@ -1 +0,0 @@
|
|||||||
*
|
|
||||||
@@ -1,16 +0,0 @@
|
|||||||
blinker==1.7.0
|
|
||||||
certifi==2023.7.22
|
|
||||||
charset-normalizer==3.3.2
|
|
||||||
click==8.1.7
|
|
||||||
Flask==3.0.0
|
|
||||||
idna==3.4
|
|
||||||
importlib-metadata==6.8.0
|
|
||||||
itsdangerous==2.1.2
|
|
||||||
Jinja2==3.1.2
|
|
||||||
MarkupSafe==2.1.3
|
|
||||||
Pillow==10.1.0
|
|
||||||
requests==2.31.0
|
|
||||||
urllib3==2.0.7
|
|
||||||
waitress==2.1.2
|
|
||||||
Werkzeug==3.0.1
|
|
||||||
zipp==3.17.0
|
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
|
|
||||||
echo "Starting python server..."
|
|
||||||
cd python && python3 -u main.py
|
|
||||||
@@ -1,13 +1,17 @@
|
|||||||
{
|
{
|
||||||
"template_artifacts": [
|
"template_artifacts": [
|
||||||
"core","starboard", "link-embed", "moderation", "entertainment", "custom-command", "utility", "webservices", "remind", "suggestion", "modmail", "assignable-roles", "experience-tracking", "logging", "statistic", "twitch",
|
"core","starboard", "link-embed", "moderation", "entertainment", "custom-command", "utility", "webservices", "remind",
|
||||||
|
"suggestion", "modmail", "assignable-roles", "experience-tracking", "logging", "statistic", "twitch", "giveaway", "sticky-roles",
|
||||||
|
"image-generation",
|
||||||
"quotes", "meetup", "debra", "rss-news",
|
"quotes", "meetup", "debra", "rss-news",
|
||||||
"moderation-custom",
|
"moderation-custom", "image-generation-custom",
|
||||||
"moderation-template-overrides", "experience-template-overrides", "logging-template-overrides"
|
"moderation-template-overrides", "experience-template-overrides", "logging-template-overrides"
|
||||||
],
|
],
|
||||||
"translation_artifacts": [
|
"translation_artifacts": [
|
||||||
"core",
|
"core",
|
||||||
"starboard", "link-embed", "moderation", "entertainment", "custom-command", "utility", "webservices", "suggestion", "remind", "modmail", "assignable-roles", "experience-tracking", "logging", "statistic", "twitch",
|
"starboard", "link-embed", "moderation", "entertainment", "custom-command", "utility", "webservices",
|
||||||
|
"suggestion", "remind", "modmail", "assignable-roles", "experience-tracking", "logging", "statistic", "twitch", "giveaway", "sticky-roles",
|
||||||
|
"image-generation",
|
||||||
"quotes", "meetup", "debra", "rss-news",
|
"quotes", "meetup", "debra", "rss-news",
|
||||||
"moderation-custom",
|
"moderation-custom",
|
||||||
"moderation-translation-overrides", "experience-translation-overrides", "logging-translation-overrides"
|
"moderation-translation-overrides", "experience-translation-overrides", "logging-translation-overrides"
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>dev.sheldan.sissi</groupId>
|
<groupId>dev.sheldan.sissi</groupId>
|
||||||
<artifactId>sissi</artifactId>
|
<artifactId>sissi</artifactId>
|
||||||
<version>1.4.24</version>
|
<version>1.4.44-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
|||||||
43
docker-compose.yml
Normal file
43
docker-compose.yml
Normal file
@@ -0,0 +1,43 @@
|
|||||||
|
version: "3.7"
|
||||||
|
|
||||||
|
services:
|
||||||
|
bot-packaging:
|
||||||
|
build:
|
||||||
|
context: deployment/image-packaging/src/main/docker/sissi
|
||||||
|
image: ${REGISTRY_PREFIX}sissi-bot:${VERSION:-latest}
|
||||||
|
debra-rest-api:
|
||||||
|
build:
|
||||||
|
context: python/modules/debra-rest-api
|
||||||
|
dockerfile: docker/Dockerfile
|
||||||
|
image: ${REGISTRY_PREFIX}sissi-debra-rest-api:${VERSION:-latest}
|
||||||
|
image-gen-api:
|
||||||
|
build:
|
||||||
|
context: python/modules/image-gen-api
|
||||||
|
dockerfile: docker/Dockerfile
|
||||||
|
image: ${REGISTRY_PREFIX}sissi-image-gen-api:${VERSION:-latest}
|
||||||
|
rest-api-packaging:
|
||||||
|
build:
|
||||||
|
context: deployment/image-packaging/src/main/docker/rest-api
|
||||||
|
args:
|
||||||
|
SISSI_REGISTRY_PREFIX: ${REGISTRY_PREFIX}
|
||||||
|
REGISTRY_PREFIX: ${ABSTRACTO_PREFIX}
|
||||||
|
VERSION: ${VERSION}
|
||||||
|
ABSTRACTO_VERSION: ${ABSTRACTO_VERSION}
|
||||||
|
image: ${REGISTRY_PREFIX}sissi-rest-api:${VERSION:-latest}
|
||||||
|
private-rest-api-packaging:
|
||||||
|
build:
|
||||||
|
context: deployment/image-packaging/src/main/docker/private-rest-api
|
||||||
|
args:
|
||||||
|
REGISTRY_PREFIX: ${ABSTRACTO_PREFIX}
|
||||||
|
SISSI_REGISTRY_PREFIX: ${REGISTRY_PREFIX}
|
||||||
|
ABSTRACTO_VERSION: ${ABSTRACTO_VERSION}
|
||||||
|
VERSION: ${VERSION}
|
||||||
|
image: ${REGISTRY_PREFIX}sissi-private-rest-api:${VERSION:-latest}
|
||||||
|
db-data:
|
||||||
|
build:
|
||||||
|
context: deployment/image-packaging/src/main/docker/db-data
|
||||||
|
image: ${REGISTRY_PREFIX}sissi-db-data:${VERSION:-latest}
|
||||||
|
template-data:
|
||||||
|
build:
|
||||||
|
context: deployment/image-packaging/src/main/docker/template-data
|
||||||
|
image: ${REGISTRY_PREFIX}sissi-template-data:${VERSION:-latest}
|
||||||
28
pom.xml
28
pom.xml
@@ -13,15 +13,13 @@
|
|||||||
<groupId>dev.sheldan.sissi</groupId>
|
<groupId>dev.sheldan.sissi</groupId>
|
||||||
<artifactId>sissi</artifactId>
|
<artifactId>sissi</artifactId>
|
||||||
<name>Sissi</name>
|
<name>Sissi</name>
|
||||||
<version>1.4.24</version>
|
<version>1.4.44-SNAPSHOT</version>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
<maven.compiler.target>17</maven.compiler.target>
|
<maven.compiler.target>17</maven.compiler.target>
|
||||||
<maven.compiler.source>17</maven.compiler.source>
|
<maven.compiler.source>17</maven.compiler.source>
|
||||||
<!-- edit in release.yml as well -->
|
<abstracto.version>1.5.25-SNAPSHOT</abstracto.version>
|
||||||
<!-- when releasing a new bot version, update the .env as well-->
|
<abstracto.templates.version>1.4.33-SNAPSHOT</abstracto.templates.version>
|
||||||
<abstracto.version>1.5.12</abstracto.version>
|
|
||||||
<abstracto.templates.version>1.4.23</abstracto.templates.version>
|
|
||||||
<apache-jena.version>4.9.0</apache-jena.version>
|
<apache-jena.version>4.9.0</apache-jena.version>
|
||||||
<rssreader.version>3.5.0</rssreader.version>
|
<rssreader.version>3.5.0</rssreader.version>
|
||||||
</properties>
|
</properties>
|
||||||
@@ -39,8 +37,15 @@
|
|||||||
<url>https://jcenter.bintray.com</url>
|
<url>https://jcenter.bintray.com</url>
|
||||||
</repository>
|
</repository>
|
||||||
<repository>
|
<repository>
|
||||||
<id>github</id>
|
<id>github-abstracto</id>
|
||||||
<url>https://maven.pkg.github.com/Sheldan/*</url>
|
<url>https://maven.pkg.github.com/Sheldan/abstracto*</url>
|
||||||
|
<snapshots>
|
||||||
|
<enabled>true</enabled>
|
||||||
|
</snapshots>
|
||||||
|
</repository>
|
||||||
|
<repository>
|
||||||
|
<id>github-sissi</id>
|
||||||
|
<url>https://maven.pkg.github.com/Sheldan/Sissi*</url>
|
||||||
<snapshots>
|
<snapshots>
|
||||||
<enabled>true</enabled>
|
<enabled>true</enabled>
|
||||||
</snapshots>
|
</snapshots>
|
||||||
@@ -50,16 +55,17 @@
|
|||||||
|
|
||||||
<distributionManagement>
|
<distributionManagement>
|
||||||
<repository>
|
<repository>
|
||||||
<id>github</id>
|
<id>github-sissi</id>
|
||||||
<name>GitHub Packages</name>
|
<name>GitHub Packages</name>
|
||||||
<url>https://maven.pkg.github.com/Sheldan/Sissi</url>
|
<url>https://maven.pkg.github.com/Sheldan/Sissi</url>
|
||||||
</repository>
|
</repository>
|
||||||
</distributionManagement>
|
</distributionManagement>
|
||||||
|
|
||||||
<scm>
|
<scm>
|
||||||
<url>https://maven.pkg.github.com/Sheldan/Sissi</url>
|
<connection>scm:git:${project.scm.url}</connection>
|
||||||
<developerConnection>scm:git:git@github.com:Sheldan/Sissi.git</developerConnection>
|
<developerConnection>scm:git:${project.scm.url}</developerConnection>
|
||||||
<tag>sissi-1.4.24</tag>
|
<url>https://github.com/Sheldan/Sissi.git</url>
|
||||||
|
<tag>HEAD</tag>
|
||||||
</scm>
|
</scm>
|
||||||
|
|
||||||
</project>
|
</project>
|
||||||
3
python/modules/debra-rest-api/docker/Dockerfile
Normal file
3
python/modules/debra-rest-api/docker/Dockerfile
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
FROM alpine:3.19.0
|
||||||
|
ADD resources/ /python/resources
|
||||||
|
ADD python /python
|
||||||
@@ -4,14 +4,19 @@ import requests
|
|||||||
import os
|
import os
|
||||||
import json
|
import json
|
||||||
import logging
|
import logging
|
||||||
|
import uuid
|
||||||
from __main__ import app
|
from __main__ import app
|
||||||
from utils import serve_pil_image
|
from utils import flask_utils
|
||||||
|
from datetime import timezone, datetime
|
||||||
|
import pytz
|
||||||
|
|
||||||
|
|
||||||
sissi_host = os.getenv('SISSI_HOST')
|
sissi_host = os.getenv('SISSI_HOST')
|
||||||
sissi_port = os.getenv('SISSI_PORT')
|
sissi_port = os.getenv('SISSI_PORT')
|
||||||
latest_donations_url = f'http://{sissi_host}:{sissi_port}/debra/latestDonations'
|
latest_donations_url = f'http://{sissi_host}:{sissi_port}/debra/latestDonations'
|
||||||
highest_donations_url = f'http://{sissi_host}:{sissi_port}/debra/highestDonations'
|
highest_donations_url = f'http://{sissi_host}:{sissi_port}/debra/highestDonations'
|
||||||
campaign_info_url = f'http://{sissi_host}:{sissi_port}/debra/campaignInfo'
|
campaign_info_url = f'http://{sissi_host}:{sissi_port}/debra/campaignInfo'
|
||||||
|
endless_stream_info_url = f'http://{sissi_host}:{sissi_port}/stream/endlessStream'
|
||||||
|
|
||||||
|
|
||||||
class DonationImageGenerationParameters:
|
class DonationImageGenerationParameters:
|
||||||
@@ -69,6 +74,7 @@ class DonationImageGenerationParameters:
|
|||||||
self.validation_message = f'Blue must be between {DonationImageGenerationConstants.color_range[0]} and {DonationImageGenerationConstants.color_range[1]} inclusively'
|
self.validation_message = f'Blue must be between {DonationImageGenerationConstants.color_range[0]} and {DonationImageGenerationConstants.color_range[1]} inclusively'
|
||||||
self.validation_value = self.color[2]
|
self.validation_value = self.color[2]
|
||||||
|
|
||||||
|
|
||||||
@app.route('/debra/latestDonations')
|
@app.route('/debra/latestDonations')
|
||||||
def latest_donations():
|
def latest_donations():
|
||||||
donation_stats = requests.get(latest_donations_url)
|
donation_stats = requests.get(latest_donations_url)
|
||||||
@@ -124,7 +130,61 @@ def total_donations_image():
|
|||||||
d1 = ImageDraw.Draw(img)
|
d1 = ImageDraw.Draw(img)
|
||||||
font = ImageFont.truetype(f'{parameters.font_name}.ttf', parameters.font_size)
|
font = ImageFont.truetype(f'{parameters.font_name}.ttf', parameters.font_size)
|
||||||
d1.text((0, 0), f"{campaign_info['collected']}/{campaign_info['target']}€", fill=parameters.color, font=font)
|
d1.text((0, 0), f"{campaign_info['collected']}/{campaign_info['target']}€", fill=parameters.color, font=font)
|
||||||
return serve_pil_image(img)
|
return flask_utils.serve_pil_image(img)
|
||||||
|
|
||||||
|
|
||||||
|
@app.route('/debra/image/endlessStream/end')
|
||||||
|
def endless_stream_image():
|
||||||
|
stream_id = int(request.args.get('streamId', type=int))
|
||||||
|
endless_stream_info = json.loads(requests.get(f'{endless_stream_info_url}/{stream_id}').text)
|
||||||
|
logging.info(f'rendering endless stream end image')
|
||||||
|
parameters = parse_image_parameters()
|
||||||
|
if not parameters.validated:
|
||||||
|
return parameters.validation_message, 400
|
||||||
|
img = Image.new('RGBA', (parameters.canvas_width, parameters.canvas_height), (255, 0, 0, 0))
|
||||||
|
d1 = ImageDraw.Draw(img)
|
||||||
|
font = ImageFont.truetype(f'{parameters.font_name}.ttf', parameters.font_size)
|
||||||
|
end_time = datetime.strptime(endless_stream_info['endDate'], "%Y-%m-%dT%H:%M:%S%z")
|
||||||
|
tz = pytz.timezone('Europe/Vienna')
|
||||||
|
end_time_formatted = end_time.astimezone(tz).strftime('%d.%m %H:%M')
|
||||||
|
d1.text((0, 0), f"{end_time_formatted}", fill=parameters.color, font=font)
|
||||||
|
return flask_utils.serve_pil_image(img)
|
||||||
|
|
||||||
|
|
||||||
|
@app.route('/debra/image/endlessStream/end/html')
|
||||||
|
def endless_stream_html():
|
||||||
|
refresh_interval = int(request.args.get('refreshInterval', 30, type=int))
|
||||||
|
random_bit = str(uuid.uuid4())
|
||||||
|
parameters_query = request.query_string.decode()
|
||||||
|
return render_template('image_refresh_wrapper.html', imagePath=f'/debra/image/endlessStream/end?{parameters_query}&{random_bit}', refreshInterval=refresh_interval)
|
||||||
|
|
||||||
|
|
||||||
|
@app.route('/debra/image/endlessStream/remaining')
|
||||||
|
def endless_stream_remaining():
|
||||||
|
stream_id = int(request.args.get('streamId', type=int))
|
||||||
|
endless_stream_info = json.loads(requests.get(f'{endless_stream_info_url}/{stream_id}').text)
|
||||||
|
logging.info(f'rendering endless stream remaining image')
|
||||||
|
parameters = parse_image_parameters()
|
||||||
|
if not parameters.validated:
|
||||||
|
return parameters.validation_message, 400
|
||||||
|
img = Image.new('RGBA', (parameters.canvas_width, parameters.canvas_height), (255, 0, 0, 0))
|
||||||
|
d1 = ImageDraw.Draw(img)
|
||||||
|
font = ImageFont.truetype(f'{parameters.font_name}.ttf', parameters.font_size)
|
||||||
|
end_time = datetime.strptime(endless_stream_info['endDate'], "%Y-%m-%dT%H:%M:%S%z").replace(tzinfo=pytz.utc)
|
||||||
|
current_time = datetime.now(timezone.utc)
|
||||||
|
remaining_time = end_time - current_time
|
||||||
|
total_seconds = remaining_time.total_seconds()
|
||||||
|
remaining_time_formatted = f'{int(total_seconds // 3600):02d}:{int((total_seconds % 3600) // 60):02d}:{int(total_seconds % 60):02d}'
|
||||||
|
d1.text((0, 0), f"{remaining_time_formatted}", fill=parameters.color, font=font)
|
||||||
|
return flask_utils.serve_pil_image(img)
|
||||||
|
|
||||||
|
|
||||||
|
@app.route('/debra/image/endlessStream/remaining/html')
|
||||||
|
def endless_stream_remaining_html():
|
||||||
|
refresh_interval = int(request.args.get('refreshInterval', 30, type=int))
|
||||||
|
random_bit = str(uuid.uuid4())
|
||||||
|
parameters_query = request.query_string.decode()
|
||||||
|
return render_template('image_refresh_wrapper.html', imagePath=f'/debra/image/endlessStream/remaining?{parameters_query}&{random_bit}', refreshInterval=refresh_interval)
|
||||||
|
|
||||||
|
|
||||||
@app.route('/debra/image/latestDonations')
|
@app.route('/debra/image/latestDonations')
|
||||||
@@ -150,19 +210,25 @@ def highest_donation_image():
|
|||||||
@app.route('/debra/image/highestDonations/html')
|
@app.route('/debra/image/highestDonations/html')
|
||||||
def highest_donations_image_html_wrapper():
|
def highest_donations_image_html_wrapper():
|
||||||
refresh_interval = int(request.args.get('refreshInterval', 30, type=int))
|
refresh_interval = int(request.args.get('refreshInterval', 30, type=int))
|
||||||
return render_template('image_refresh_wrapper.html', imagePath=f'/debra/image/highestDonations?{request.query_string.decode()}', refreshInterval=refresh_interval)
|
random_bit = str(uuid.uuid4())
|
||||||
|
parameters_query = request.query_string.decode()
|
||||||
|
return render_template('image_refresh_wrapper.html', imagePath=f'/debra/image/highestDonations?{parameters_query}&{random_bit}', refreshInterval=refresh_interval)
|
||||||
|
|
||||||
|
|
||||||
@app.route('/debra/image/latestDonations/html')
|
@app.route('/debra/image/latestDonations/html')
|
||||||
def latest_donations_image_html_wrapper():
|
def latest_donations_image_html_wrapper():
|
||||||
refresh_interval = int(request.args.get('refreshInterval', 30, type=int))
|
refresh_interval = int(request.args.get('refreshInterval', 30, type=int))
|
||||||
return render_template('image_refresh_wrapper.html', imagePath=f'/debra/image/latestDonations?{request.query_string.decode()}', refreshInterval=refresh_interval)
|
random_bit = str(uuid.uuid4())
|
||||||
|
parameters_query = request.query_string.decode()
|
||||||
|
return render_template('image_refresh_wrapper.html', imagePath=f'/debra/image/latestDonations?{parameters_query}&{random_bit}', refreshInterval=refresh_interval)
|
||||||
|
|
||||||
|
|
||||||
@app.route('/debra/image/info/html')
|
@app.route('/debra/image/info/html')
|
||||||
def total_donations_image_html_wrapper():
|
def total_donations_image_html_wrapper():
|
||||||
refresh_interval = int(request.args.get('refreshInterval', 30, type=int))
|
refresh_interval = int(request.args.get('refreshInterval', 30, type=int))
|
||||||
return render_template('image_refresh_wrapper.html', imagePath=f'/debra/image/info?{request.query_string.decode()}', refreshInterval=refresh_interval)
|
random_bit = str(uuid.uuid4())
|
||||||
|
parameters_query = request.query_string.decode()
|
||||||
|
return render_template('image_refresh_wrapper.html', imagePath=f'/debra/image/info?{parameters_query}&{random_bit}', refreshInterval=refresh_interval)
|
||||||
|
|
||||||
|
|
||||||
def rendering_donation_image(donation_stats, parameters):
|
def rendering_donation_image(donation_stats, parameters):
|
||||||
@@ -176,7 +242,7 @@ def rendering_donation_image(donation_stats, parameters):
|
|||||||
name = donation['firstName'] if not donation['anonymous'] else 'anonym'
|
name = donation['firstName'] if not donation['anonymous'] else 'anonym'
|
||||||
d1.text((0, height * it), f"{donation['donationAmount']}€ von {name}", fill=parameters.color, font=font)
|
d1.text((0, height * it), f"{donation['donationAmount']}€ von {name}", fill=parameters.color, font=font)
|
||||||
it += 1
|
it += 1
|
||||||
return serve_pil_image(img)
|
return flask_utils.serve_pil_image(img)
|
||||||
|
|
||||||
|
|
||||||
def parse_image_parameters() -> DonationImageGenerationParameters:
|
def parse_image_parameters() -> DonationImageGenerationParameters:
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<meta http-equiv="refresh" content="{{ refreshInterval }}">
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<img src="{{ imagePath }}">
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
3
python/modules/image-gen-api/docker/Dockerfile
Normal file
3
python/modules/image-gen-api/docker/Dockerfile
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
FROM alpine:3.19.0
|
||||||
|
ADD resources/ /python/resources
|
||||||
|
ADD python /python
|
||||||
@@ -2,18 +2,23 @@ from __main__ import app
|
|||||||
|
|
||||||
from PIL import Image, ImageDraw, ImageFont
|
from PIL import Image, ImageDraw, ImageFont
|
||||||
from flask import request
|
from flask import request
|
||||||
|
import logging
|
||||||
|
|
||||||
from utils import serve_pil_image
|
from utils import flask_utils
|
||||||
|
|
||||||
|
|
||||||
@app.route('/memes/doge/orangeSun/')
|
@app.route('/memes/doge/orangeSun/')
|
||||||
def image_gen():
|
def doge_orange_sun():
|
||||||
text = request.args.get('text')
|
text = request.args.get('text')
|
||||||
with Image.open('res/img/semf_template.jpg') as im:
|
if text is None:
|
||||||
|
return 'no text', 400
|
||||||
|
logging.info(f'Rendering doge orange sun.')
|
||||||
|
with Image.open('resources/img/semf_template.jpg') as im:
|
||||||
d1 = ImageDraw.Draw(im)
|
d1 = ImageDraw.Draw(im)
|
||||||
text_box_size = (300, 240)
|
text_box_size = (300, 240)
|
||||||
W, H = text_box_size
|
W, H = text_box_size
|
||||||
font = ImageFont.truetype(f'Impact.ttf', 60)
|
font = ImageFont.truetype(f'Impact.ttf', 60)
|
||||||
_, _, w, h = d1.textbbox((0, 0), text, font=font)
|
_, _, w, h = d1.textbbox((0, 0), text, font=font)
|
||||||
d1.text(((W-w)/2 + 320, (H-h)/2 + 120), text, font=font, fill=(255, 255, 255))
|
d1.text(((W-w)/2 + 320, (H-h)/2 + 120), text, font=font, fill=(255, 255, 255))
|
||||||
return serve_pil_image(im)
|
return flask_utils.serve_pil_image(im)
|
||||||
|
|
||||||
|
|
||||||
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
@@ -1,23 +0,0 @@
|
|||||||
import logging
|
|
||||||
import os
|
|
||||||
|
|
||||||
from flask import Flask
|
|
||||||
|
|
||||||
FORMAT = '%(asctime)s - %(name)s - %(levelname)s - %(message)s'
|
|
||||||
logging.basicConfig(encoding='utf-8', level=logging.INFO, format=FORMAT)
|
|
||||||
template_dir = os.path.abspath('res/templates')
|
|
||||||
app = Flask(__name__, template_folder=template_dir)
|
|
||||||
|
|
||||||
# loads the api end points
|
|
||||||
import debra
|
|
||||||
import image_gen
|
|
||||||
|
|
||||||
@app.route('/')
|
|
||||||
def hello():
|
|
||||||
return 'Hello, World?'
|
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
|
||||||
from waitress import serve
|
|
||||||
|
|
||||||
serve(app, host="0.0.0.0", port=8080)
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
<meta http-equiv="refresh" content="{{ refreshInterval }}">
|
|
||||||
<html>
|
|
||||||
<head></head>
|
|
||||||
<body>
|
|
||||||
<img src="{{ imagePath }}">
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
@@ -1,17 +0,0 @@
|
|||||||
from io import BytesIO
|
|
||||||
|
|
||||||
from flask import send_file
|
|
||||||
|
|
||||||
|
|
||||||
def serve_pil_image(pil_img):
|
|
||||||
img_io = BytesIO()
|
|
||||||
pil_img.save(img_io, 'PNG')
|
|
||||||
img_io.seek(0)
|
|
||||||
return send_file(img_io, mimetype='image/png')
|
|
||||||
|
|
||||||
|
|
||||||
class ValidationException(Exception):
|
|
||||||
def __init__(self, provided_value, message):
|
|
||||||
self.provided_value = provided_value
|
|
||||||
self.message = message
|
|
||||||
super().__init__(f'{self.message}: provided value: {provided_value}')
|
|
||||||
28
settings.xml
28
settings.xml
@@ -16,8 +16,15 @@
|
|||||||
<url>https://repo1.maven.org/maven2</url>
|
<url>https://repo1.maven.org/maven2</url>
|
||||||
</repository>
|
</repository>
|
||||||
<repository>
|
<repository>
|
||||||
<id>github</id>
|
<id>github-abstracto</id>
|
||||||
<url>https://maven.pkg.github.com/Sheldan/*</url>
|
<url>https://maven.pkg.github.com/Sheldan/abstracto*</url>
|
||||||
|
<snapshots>
|
||||||
|
<enabled>true</enabled>
|
||||||
|
</snapshots>
|
||||||
|
</repository>
|
||||||
|
<repository>
|
||||||
|
<id>github-sissi</id>
|
||||||
|
<url>https://maven.pkg.github.com/Sheldan/Sissi*</url>
|
||||||
<snapshots>
|
<snapshots>
|
||||||
<enabled>true</enabled>
|
<enabled>true</enabled>
|
||||||
</snapshots>
|
</snapshots>
|
||||||
@@ -28,9 +35,20 @@
|
|||||||
|
|
||||||
<servers>
|
<servers>
|
||||||
<server>
|
<server>
|
||||||
<id>github</id>
|
<id>github-abstracto</id>
|
||||||
<username>${env.user}</username>
|
<username>${env.abstractoUser}</username>
|
||||||
<password>${env.token}</password>
|
<password>${env.abstractoToken}</password>
|
||||||
|
</server>
|
||||||
|
<server>
|
||||||
|
<id>github-sissi</id>
|
||||||
|
<configuration>
|
||||||
|
<httpHeaders>
|
||||||
|
<property>
|
||||||
|
<name>Authorization</name>
|
||||||
|
<value>Bearer ${env.GITHUB_TOKEN}</value>
|
||||||
|
</property>
|
||||||
|
</httpHeaders>
|
||||||
|
</configuration>
|
||||||
</server>
|
</server>
|
||||||
</servers>
|
</servers>
|
||||||
</settings>
|
</settings>
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>dev.sheldan.sissi</groupId>
|
<groupId>dev.sheldan.sissi</groupId>
|
||||||
<artifactId>sissi</artifactId>
|
<artifactId>sissi</artifactId>
|
||||||
<version>1.4.24</version>
|
<version>1.4.44-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,35 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
<parent>
|
||||||
|
<artifactId>customization-templates</artifactId>
|
||||||
|
<groupId>dev.sheldan.sissi.templates</groupId>
|
||||||
|
<version>1.4.44-SNAPSHOT</version>
|
||||||
|
</parent>
|
||||||
|
|
||||||
|
<artifactId>image-generation-customization-templates</artifactId>
|
||||||
|
|
||||||
|
<build>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-assembly-plugin</artifactId>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<phase>package</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>single</goal>
|
||||||
|
</goals>
|
||||||
|
<configuration>
|
||||||
|
<finalName>image-generation-custom-templates-${project.version}</finalName>
|
||||||
|
<appendAssemblyId>false</appendAssemblyId>
|
||||||
|
<descriptors>
|
||||||
|
<descriptor>src/main/assembly/assembly.xml</descriptor>
|
||||||
|
</descriptors>
|
||||||
|
</configuration>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
|
</project>
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2"
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2 http://maven.apache.org/xsd/assembly-1.1.2.xsd">
|
||||||
|
<id>zip</id>
|
||||||
|
<includeBaseDirectory>false</includeBaseDirectory>
|
||||||
|
<formats>
|
||||||
|
<format>zip</format>
|
||||||
|
</formats>
|
||||||
|
<fileSets>
|
||||||
|
<fileSet>
|
||||||
|
<outputDirectory>.</outputDirectory>
|
||||||
|
<directory>${project.basedir}/src/main/resources</directory>
|
||||||
|
</fileSet>
|
||||||
|
</fileSets>
|
||||||
|
</assembly>
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
{}
|
||||||
@@ -3,7 +3,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>dev.sheldan.sissi.templates</groupId>
|
<groupId>dev.sheldan.sissi.templates</groupId>
|
||||||
<artifactId>customization-templates</artifactId>
|
<artifactId>customization-templates</artifactId>
|
||||||
<version>1.4.24</version>
|
<version>1.4.44-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<artifactId>sissi-templates</artifactId>
|
<artifactId>sissi-templates</artifactId>
|
||||||
<groupId>dev.sheldan.sissi.templates</groupId>
|
<groupId>dev.sheldan.sissi.templates</groupId>
|
||||||
<version>1.4.24</version>
|
<version>1.4.44-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
@@ -11,6 +11,7 @@
|
|||||||
<packaging>pom</packaging>
|
<packaging>pom</packaging>
|
||||||
<modules>
|
<modules>
|
||||||
<module>moderation-customization-templates</module>
|
<module>moderation-customization-templates</module>
|
||||||
|
<module>image-generation-customization-templates</module>
|
||||||
</modules>
|
</modules>
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<artifactId>module-templates</artifactId>
|
<artifactId>module-templates</artifactId>
|
||||||
<groupId>dev.sheldan.sissi.templates</groupId>
|
<groupId>dev.sheldan.sissi.templates</groupId>
|
||||||
<version>1.4.24</version>
|
<version>1.4.44-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<artifactId>module-templates</artifactId>
|
<artifactId>module-templates</artifactId>
|
||||||
<groupId>dev.sheldan.sissi.templates</groupId>
|
<groupId>dev.sheldan.sissi.templates</groupId>
|
||||||
<version>1.4.24</version>
|
<version>1.4.44-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
"embeds": [
|
"embeds": [
|
||||||
{
|
{
|
||||||
<#include "abstracto_color">,
|
<#include "abstracto_color">,
|
||||||
<#assign time><@format_instant_date_time instant=meetupTime/></#assign>
|
<#assign time><@format_instant_long_date_time instant=meetupTime/></#assign>
|
||||||
<#assign topicText>${topic?json_string}</#assign>
|
<#assign topicText>${topic?json_string}</#assign>
|
||||||
"description": "<#include "meetup_cancel_notification_description">"
|
"description": "<#include "meetup_cancel_notification_description">"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
"title": {
|
"title": {
|
||||||
"title": "${topic?json_string}"
|
"title": "${topic?json_string}"
|
||||||
},
|
},
|
||||||
"description": "<@format_instant_date_time instant=meetupTime/>
|
"description": "<@format_instant_long_date_time instant=meetupTime/>
|
||||||
${description?json_string}"
|
${description?json_string}"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -4,8 +4,8 @@
|
|||||||
{
|
{
|
||||||
<#include "abstracto_color">,
|
<#include "abstracto_color">,
|
||||||
<#assign topicText=meetupTopic>
|
<#assign topicText=meetupTopic>
|
||||||
<#assign oldTime><@format_instant_date_time instant=oldDate/></#assign>
|
<#assign oldTime><@format_instant_long_date_time instant=oldDate/></#assign>
|
||||||
<#assign newTime><@format_instant_date_time instant=newDate/></#assign>
|
<#assign newTime><@format_instant_long_date_time instant=newDate/></#assign>
|
||||||
<#assign messageLink=meetupMessage.jumpUrl>
|
<#assign messageLink=meetupMessage.jumpUrl>
|
||||||
"description": "<@safe_include "changeMeetupTime_notification_text"/>"
|
"description": "<@safe_include "changeMeetupTime_notification_text"/>"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
"title": {
|
"title": {
|
||||||
"title": "${topic?json_string}"
|
"title": "${topic?json_string}"
|
||||||
},
|
},
|
||||||
"description": "<@format_instant_date_time instant=meetupTime/>
|
"description": "<@format_instant_long_date_time instant=meetupTime/>
|
||||||
${description?json_string}"
|
${description?json_string}"
|
||||||
<#if location?? && location != "%22%22">,
|
<#if location?? && location != "%22%22">,
|
||||||
"fields": [
|
"fields": [
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
"embeds": [
|
"embeds": [
|
||||||
{
|
{
|
||||||
<#include "abstracto_color">,
|
<#include "abstracto_color">,
|
||||||
"description": "<#list meetups as meetup><#assign meetup=meetup><#assign topic=meetup.topic><#assign time><@format_instant_date_time instant=meetup.meetupTime/></#assign><#assign timeRelative><@format_instant_relative instant=meetup.meetupTime/></#assign><#assign link=meetup.meetupMessage.jumpUrl><#include "meetup_list_meetup_display">
|
"description": "<#list meetups as meetup><#assign meetup=meetup><#assign topic=meetup.topic><#assign time><@format_instant_long_date_time instant=meetup.meetupTime/></#assign><#assign timeRelative><@format_instant_relative instant=meetup.meetupTime/></#assign><#assign link=meetup.meetupMessage.jumpUrl><#include "meetup_list_meetup_display">
|
||||||
<#else><#include "meetup_list_no_meetups"></#list>"
|
<#else><#include "meetup_list_no_meetups"></#list>"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
"title": {
|
"title": {
|
||||||
"title": "${topic?json_string} - <@safe_include "meetup_message_id_display"/>"
|
"title": "${topic?json_string} - <@safe_include "meetup_message_id_display"/>"
|
||||||
},
|
},
|
||||||
<#assign time><@format_instant_date_time instant=meetupTime/></#assign>
|
<#assign time><@format_instant_long_date_time instant=meetupTime/></#assign>
|
||||||
<#assign timeRelative><@format_instant_relative instant=meetupTime/></#assign>
|
<#assign timeRelative><@format_instant_relative instant=meetupTime/></#assign>
|
||||||
<#assign organizerText>${organizer.memberMention}</#assign>
|
<#assign organizerText>${organizer.memberMention}</#assign>
|
||||||
<#assign meetupId=meetupId/>
|
<#assign meetupId=meetupId/>
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
"embeds": [
|
"embeds": [
|
||||||
{
|
{
|
||||||
<#include "abstracto_color">,
|
<#include "abstracto_color">,
|
||||||
<#assign time><@format_instant_date_time instant=meetupTime/></#assign>
|
<#assign time><@format_instant_long_date_time instant=meetupTime/></#assign>
|
||||||
<#assign topicText>${topic?json_string}</#assign>
|
<#assign topicText>${topic?json_string}</#assign>
|
||||||
"description": "<#include "meetup_reminder_notification_description">"
|
"description": "<#include "meetup_reminder_notification_description">"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>dev.sheldan.sissi.templates</groupId>
|
<groupId>dev.sheldan.sissi.templates</groupId>
|
||||||
<artifactId>sissi-templates</artifactId>
|
<artifactId>sissi-templates</artifactId>
|
||||||
<version>1.4.24</version>
|
<version>1.4.44-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>dev.sheldan.sissi.templates</groupId>
|
<groupId>dev.sheldan.sissi.templates</groupId>
|
||||||
<artifactId>module-templates</artifactId>
|
<artifactId>module-templates</artifactId>
|
||||||
<version>1.4.24</version>
|
<version>1.4.44-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<artifactId>module-templates</artifactId>
|
<artifactId>module-templates</artifactId>
|
||||||
<groupId>dev.sheldan.sissi.templates</groupId>
|
<groupId>dev.sheldan.sissi.templates</groupId>
|
||||||
<version>1.4.24</version>
|
<version>1.4.44-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>dev.sheldan.sissi.templates</groupId>
|
<groupId>dev.sheldan.sissi.templates</groupId>
|
||||||
<artifactId>templates</artifactId>
|
<artifactId>templates</artifactId>
|
||||||
<version>1.4.24</version>
|
<version>1.4.44-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>dev.sheldan.sissi.templates</groupId>
|
<groupId>dev.sheldan.sissi.templates</groupId>
|
||||||
<artifactId>template-overrides</artifactId>
|
<artifactId>template-overrides</artifactId>
|
||||||
<version>1.4.24</version>
|
<version>1.4.44-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>dev.sheldan.sissi.templates</groupId>
|
<groupId>dev.sheldan.sissi.templates</groupId>
|
||||||
<artifactId>template-overrides</artifactId>
|
<artifactId>template-overrides</artifactId>
|
||||||
<version>1.4.24</version>
|
<version>1.4.44-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>dev.sheldan.sissi.templates</groupId>
|
<groupId>dev.sheldan.sissi.templates</groupId>
|
||||||
<artifactId>template-overrides</artifactId>
|
<artifactId>template-overrides</artifactId>
|
||||||
<version>1.4.24</version>
|
<version>1.4.44-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<artifactId>sissi-templates</artifactId>
|
<artifactId>sissi-templates</artifactId>
|
||||||
<groupId>dev.sheldan.sissi.templates</groupId>
|
<groupId>dev.sheldan.sissi.templates</groupId>
|
||||||
<version>1.4.24</version>
|
<version>1.4.44-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>dev.sheldan.sissi.templates.translations</groupId>
|
<groupId>dev.sheldan.sissi.templates.translations</groupId>
|
||||||
<artifactId>customization-translations</artifactId>
|
<artifactId>customization-translations</artifactId>
|
||||||
<version>1.4.24</version>
|
<version>1.4.44-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<artifactId>sissi-translations</artifactId>
|
<artifactId>sissi-translations</artifactId>
|
||||||
<groupId>dev.sheldan.sissi.templates.translations</groupId>
|
<groupId>dev.sheldan.sissi.templates.translations</groupId>
|
||||||
<version>1.4.24</version>
|
<version>1.4.44-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<artifactId>module-translations</artifactId>
|
<artifactId>module-translations</artifactId>
|
||||||
<groupId>dev.sheldan.sissi.templates.translations</groupId>
|
<groupId>dev.sheldan.sissi.templates.translations</groupId>
|
||||||
<version>1.4.24</version>
|
<version>1.4.44-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1 @@
|
|||||||
|
The amount of records fetched from the Debra api. Default: ${defaultValue}
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
The amount of time (in milliseconds) after which the donation notification should be sent. Default: ${defaultValue}
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
The amount of minutes per euro donation. Default: ${defaultValue}
|
||||||
@@ -3,7 +3,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>dev.sheldan.sissi.templates.translations</groupId>
|
<groupId>dev.sheldan.sissi.templates.translations</groupId>
|
||||||
<artifactId>module-translations</artifactId>
|
<artifactId>module-translations</artifactId>
|
||||||
<version>1.4.24</version>
|
<version>1.4.44-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>dev.sheldan.sissi.templates.translations</groupId>
|
<groupId>dev.sheldan.sissi.templates.translations</groupId>
|
||||||
<artifactId>sissi-translations</artifactId>
|
<artifactId>sissi-translations</artifactId>
|
||||||
<version>1.4.24</version>
|
<version>1.4.44-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>dev.sheldan.sissi.templates.translations</groupId>
|
<groupId>dev.sheldan.sissi.templates.translations</groupId>
|
||||||
<artifactId>module-translations</artifactId>
|
<artifactId>module-translations</artifactId>
|
||||||
<version>1.4.24</version>
|
<version>1.4.44-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user