mirror of
https://github.com/InsanusMokrassar/PlaguPoster.git
synced 2025-09-14 20:49:36 +00:00
production ready?
This commit is contained in:
7
runner/Dockerfile
Normal file
7
runner/Dockerfile
Normal file
@@ -0,0 +1,7 @@
|
||||
FROM adoptopenjdk/openjdk11
|
||||
|
||||
USER 1000
|
||||
|
||||
ENTRYPOINT ["/plaguposter.runner/bin/plaguposter.runner", "/config.json"]
|
||||
|
||||
ADD ./build/distributions/plaguposter.runner.tar /
|
@@ -4,6 +4,8 @@ plugins {
|
||||
id 'application'
|
||||
}
|
||||
|
||||
project.version = null
|
||||
|
||||
dependencies {
|
||||
implementation libs.kotlin
|
||||
api libs.plagubot.bot
|
||||
|
26
runner/deploy.sh
Executable file
26
runner/deploy.sh
Executable file
@@ -0,0 +1,26 @@
|
||||
#!/bin/bash
|
||||
|
||||
function send_notification() {
|
||||
echo "$1"
|
||||
}
|
||||
|
||||
function assert_success() {
|
||||
"${@}"
|
||||
local status=${?}
|
||||
if [ ${status} -ne 0 ]; then
|
||||
send_notification "### Error ${status} at: ${BASH_LINENO[*]} ###"
|
||||
exit ${status}
|
||||
fi
|
||||
}
|
||||
|
||||
app=plaguposter
|
||||
version=0.0.1
|
||||
server=docker.inmo.dev
|
||||
|
||||
assert_success ../gradlew build
|
||||
# scp ./build/distributions/AutoPostTestTelegramBot-1.0.0.zip ./config.json developer@insanusmokrassar.dev:/tmp/
|
||||
assert_success sudo docker build -t $app:"$version" .
|
||||
assert_success sudo docker tag $app:"$version" $server/$app:$version
|
||||
assert_success sudo docker tag $app:"$version" $server/$app:latest
|
||||
assert_success sudo docker push $server/$app:$version
|
||||
assert_success sudo docker push $server/$app:latest
|
Reference in New Issue
Block a user