Skip to content
Snippets Groups Projects
Commit 3950f902 authored by Griefed's avatar Griefed :joystick:
Browse files

Initial push

parent 7dd8be1d
No related branches found
No related tags found
No related merge requests found
export GITHUB_REPONAME='docker-template-repo'
export GITHUB_USERNAME='username'
export GITHUB_REPONAME_HEADER=GITHUB_REPONAME_header.png
export GITHUB_REPONAME_SCREENSHOT=GITHUB_REPONAME_screenshot.png
export DOCKERHUB_REPONAME='template-repo'
export DOCKERHUB_TAG='tag'
export DOCKERHUB_USERNAME='username'
export DESCRIPTION='This is an example description for the docker-template-repo. This text should be replaced with an adequate description of the repo this template was clone for. Blablablablablabla you know the drill.'
export CREATOR_USERNAME='Griefed'
export CREATOR_REPONAME='template'
export EXAMPLE_SITE_LINK='https://www.example.com'
export CONTAINER_PORT='80'
export CONTAINER_PORT2='443:443'
export GITHUB_REPONAME='docker-Curseforge-Bot'
export GITHUB_USERNAME='Griefed'
export GITHUB_REPONAME_HEADER=docker-Curseforge-Bot_header.png
export GITHUB_REPONAME_SCREENSHOT=docker-Curseforge-Bot_screenshot.png
export DOCKERHUB_REPONAME='curseforge-bot'
export DOCKERHUB_TAG='latest'
export DOCKERHUB_USERNAME='griefed'
export DESCRIPTION='A discord bot, which informs users about new files of specific mods'
export CREATOR_USERNAME='ErdbeerbaerLP'
export CREATOR_REPONAME='Curseforge-Bot'
export EXAMPLE_SITE_LINK='https://github.com/ErdbeerbaerLP/Curseforge-Bot'
export BASE_IMAGE='lsiobase/alpine'
\ No newline at end of file
......@@ -50,9 +50,6 @@ services:
- TZ=Europe/Berlin
- PUID=1000 # User ID
- PGID=1000 # Group ID
ports:
- 80:$CONTAINER_PORT
- $CONTAINER_PORT2
```
## Raspberry Pi
......@@ -105,14 +102,10 @@ services:
- TZ=Europe/Berlin
- PUID=1000 # User ID
- PGID=1000 # Group ID
ports:
- 8080:$CONTAINER_PORT
- $CONTAINER_PORT2
```
1. Clone the repository: `git clone https://github.com/Griefed/$GITHUB_REPONAME.git ./$GITHUB_REPONAME`
1. Prepare docker-compose.yml file as seen above
1. `docker-compose up -d --build $DOCKERHUB_REPONAME`
1. Visit IP.ADDRESS.OF.HOST:8080
1. ???
1. Profit!
### PICK ONE
# FROM lsiobase/nginx:3.12
# FROM lsiobase/ubuntu:bionic
# FROM lsiobase/rdesktop:focal
# FROM lsiobase/mono:LTS
# FROM lsiobase/alpine:3.12
###
FROM lsiobase/alpine:3.12
LABEL maintainer="Griefed <griefed@griefed.de>"
#RUN \
# echo "**** install dependencies and build tools and stuff ****" && \
# apk add --no-cache \
# git && \
#
# ###
# # INSTALL EVERYTHING
# # ÄÄÄWÄÄÄRIIIZIIIING
# ###
#
# echo "**** clone app repository ****" && \
# git clone -b \
# GITURL \
# /app/APPNAME && \
# echo "**** install app, for example with npm ****" && \
# cd /app/APPNAME && \
# npm install && \
# npm run-script build && \
# echo "**** delete unneeded packages and stuff ****" && \
# apk del --purge \
# git && \
# rm -rf \
# /root/.cache \
# /tmp/*
#
## Copy local files
RUN \
echo "**** install dependencies and build tools and stuff ****" && \
apk add --no-cache \
openjdk11-jre-headless
curl && \
echo "**** prepare environment ****" && \
mkdir -p \
/app/curseforgebot && \
echo "**** installing application ****" && \
curl -o \
/app/curseforgebot/curseforgebot.jar -L \
"https://github.com/ErdbeerbaerLP/Curseforge-Bot/releases/download/1.2.2/Curseforge-Bot-1.2.2.jar" && \
echo "**** Cleanup ****" && \
rm -rf \
/root/.cache \
/tmp/*
#COPY root/ /
COPY root/ /
## Communicate ports and volumes to be used
#EXPOSE PORT
#VOLUME /config /data
## NOTES ##
## Delete files\folders not needed
## The User abc, should be running everything, give that permission in any case you need it.
## When creating init's Use 10's where posible, its to allow add stuff in between when needed.
## Also, do not be afraid to split custom code into several little ones.
## user abc and folders /app /config /defaults are all created by baseimage
## the first available init script is 30<your script>
## you can comment the beginning of each new RUN block but you cannot comment between commands in each RUN block.
VOLUME /config
\ No newline at end of file
# Don´t change this! Used internally to backup and reset the config if needed!
ver = 4
# Insert your discord bot token here
# or use "args" here and the argument "- token TOKEN" after the jar
BotToken = "DISCORD_BOT_TOKEN"
# The Default channel ID used for messages
DefaultChannelID=DISCORD_CHANNEL_ID
# Provide some Curseforge project IDs you want the bot to listen to
#
# If you want a specific mod in a different channel and also ping a differnt role, you can add the
# channel id and role id like this:
# "id;;ChannelID;;RoleID"
# Role ID doesnt have to be set, if its not dont include second ;;
# NOTE: Role ID can only be set if a channel id is set as well
ids = [
# Discord Integration
"324952",
# DiscordRichPresence
"300569"
# Project ID
"PROJECT_ID"
]
## UPDATE MESSAGE OPTIONS ##
# If you want the message to mention a particualr role when a update message is sent, add the Role ID here
#
# Only supports 1 role ID at this time
# Role ID
# Default 000000000
mentionRole=ROLE_ID
# Sets the message to include a download link for the new project file
#
# Use the following 3 options only to set the link
# "direct" = Direct link to download the file
# "curse" = Link to the file download page on curseforge.com
# "nolink" = Do not include a download link
updateFileLink="FILE_LINK"
# This sets the text that appears as the message description in the update notification
# (the text directly under the project name which is the message title)
#
# This can adhere to discord markdown rules but due to how the message is formatted as a whole, keep this
# message under 250 characters
messageDescription = "DESCRIPTION"
# Provide a language syntax name to have the changelog formatted inside the embeded message for easier viewing if desired.
#
# Can be very usefull if project owner/author uses discord MarkDown formatting in their changelog
# Uploads as plain text if not changed (example: yml, md, css) Only choose one syntax
changelogDiscordFormat = "CHANGELOG_FORMAT"
## GITHUB OPTIONS ##
# If you want the cache to be stored on github, add the -github argument and enter your OAuth token here
# You can also use '-github TOKEN', so it won´t be stored in a file
# NOTE: The token needs full "Repo" access
githubToken = "GITHUB_TOKEN"
# When using github as cache storage, you can also specify an custom repository name
# This bot will create an new (private) one, if none with this name exists
githubRepo = "GITHUB_REPO"
# NOTE: This config option is not yet implemented, but planned!
#
#
# You can also provide users to listen to (this will subscribe the bot to ALL projects of the user!!)
#
# (You need to provide the name from the URL here and you can also specify an channel like above!)
#users=[
# "runemoro"
#]
#!/usr/bin/with-contenv bash
if [ ! -f /config/bot.conf ]; then
cp -f \
/defaults/bot.conf \
/config/bot.conf
sed -i \
"s/DISCORD_BOT_TOKEN/&{DISCORD_BOT_TOKEN}/g" \
/config/bot.conf
sed -i \
"s/DISCORD_CHANNEL_ID/&{DISCORD_CHANNEL_ID}/g" \
/config/bot.conf
sed -i \
"s/PROJECT_ID/&{PROJECT_ID}/g" \
/config/bot.conf
if [ -z $ROLE_ID ]; then
sed -i \
"s/ROLE_ID/000000000/g" \
/config/bot.conf
else
sed -i \
"s/ROLE_ID/&{ROLE_ID}/g" \
/config/bot.conf
fi
sed -i \
"s/FILE_LINK/&{FILE_LINK}/g" \
/config/bot.conf
sed -i \
"s/DESCRIPTION/&{DESCRIPTION}/g" \
/config/bot.conf
sed -i \
"s/CHANGELOG_FORMAT/&{CHANGELOG_FORMAT}/g" \
/config/bot.conf
if [ -z $GITHUB_TOKEN ]; then
sed -i \
"s/GITHUB_TOKEN//g" \
/config/bot.conf
else
sed -i \
"s/GITHUB_TOKEN/&{GITHUB_TOKEN}/g" \
/config/bot.conf
fi
if [ -z $GITHUB_REPO ]; then
sed -i \
"s/GITHUB_REPO/CurseforgeBotCache/g" \
/config/bot.conf
else
sed -i \
"s/GITHUB_REPO/&{GITHUB_REPO}/g" \
/config/bot.conf
fi
fi
ln -sf /config/bot.conf /app/curseforgebot/bot.conf
\ No newline at end of file
#!/usr/bin/with-contenv bash
cd /app/curseforgebot
exec \
s6-setuidgid abc java -jar curseforgebot.jar
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment