Compare commits
35 Commits
Author | SHA1 | Date | |
---|---|---|---|
5d4636cbb8 | |||
39c5112295 | |||
88d865e95c | |||
27fe60a0e4 | |||
26130e7038 | |||
613d31192c | |||
ce0a5d1d0d | |||
120ada163e | |||
4b6555c2c0 | |||
04638ca319 | |||
ad2e040bab | |||
09c6a822d7 | |||
cd8c8b3281 | |||
f5ea0908d4 | |||
65267ca8cd | |||
d72bc47344 | |||
7d0a656a11 | |||
365c0890c6 | |||
6b0000f980 | |||
fb9c9cfee3 | |||
a0a5afe9db | |||
7a03d9fea7 | |||
bd045d5f4a | |||
7cddb7c193 | |||
134a8a1cd0 | |||
6d30473fa1 | |||
8f80b7e471 | |||
e582d163ca | |||
2fae65bb4c | |||
68fd58533d | |||
0ba8946eeb | |||
7ea95d7a82 | |||
804658cf9f | |||
cfc6db9479 | |||
52d72c1822 |
33
DockerFile
33
DockerFile
@ -1,20 +1,27 @@
|
||||
FROM microsoft/dotnet:1.1-sdk-projectjson
|
||||
MAINTAINER Poag <poag@gany.net>
|
||||
FROM phusion/baseimage:latest
|
||||
|
||||
WORKDIR /opt/
|
||||
|
||||
#Install Dotnet
|
||||
RUN sh -c 'echo "deb [arch=amd64] https://apt-mo.trafficmanager.net/repos/dotnet-release/ xenial main" > /etc/apt/sources.list.d/dotnetdev.list' \
|
||||
&& apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 417A0893 \
|
||||
&& apt-get update && apt-get install -y dotnet-dev-1.0.4
|
||||
|
||||
#Add ffmpeg3 ppa
|
||||
RUN add-apt-repository ppa:jonathonf/ffmpeg-3
|
||||
|
||||
#Install required software
|
||||
RUN echo "deb http://www.deb-multimedia.org jessie main non-free" | tee /etc/apt/sources.list.d/debian-backports.list \
|
||||
&& apt-get update \
|
||||
&& apt-get install -y --force-yes deb-multimedia-keyring \
|
||||
&& apt-get update \
|
||||
&& apt-get install -y git libopus0 opus-tools libopus-dev libsodium-dev ffmpeg
|
||||
RUN apt-get update && apt-get install -y git libopus0 opus-tools libopus-dev libsodium-dev ffmpeg rsync python tzdata
|
||||
|
||||
#Add youtube-dl
|
||||
RUN curl -L https://yt-dl.org/downloads/latest/youtube-dl -o /usr/local/bin/youtube-dl && chmod a+rx /usr/local/bin/youtube-dl
|
||||
|
||||
#Download and install stable version of Nadeko
|
||||
RUN curl -L https://github.com/Kwoth/NadekoBot-BashScript/raw/master/nadeko_installer_latest.sh | sh \
|
||||
&& curl -L https://github.com/Kwoth/NadekoBot-BashScript/raw/master/nadeko_autorestart.sh > nadeko.sh \
|
||||
&& chmod 755 nadeko.sh
|
||||
RUN curl -O https://raw.githubusercontent.com/mattburchett/nadeko/dev/nadeko_installer_1_4.sh && chmod 755 nadeko_installer_1_4.sh && ./nadeko_installer_1_4.sh \
|
||||
&& curl -O https://raw.githubusercontent.com/mattburchett/nadeko/dev/nadeko_autorestart.sh && chmod 755 nadeko_autorestart.sh
|
||||
|
||||
|
||||
|
||||
VOLUME ["/root/nadeko"]
|
||||
|
||||
VOLUME ["/opt"]
|
||||
|
||||
CMD ["/opt/nadeko.sh"]
|
||||
CMD ["sh","/opt/nadeko_autorestart.sh"]
|
||||
|
30
nadeko_autorestart.sh
Normal file
30
nadeko_autorestart.sh
Normal file
@ -0,0 +1,30 @@
|
||||
#!/bin/sh
|
||||
|
||||
if hash dotnet 2>/dev/null
|
||||
then
|
||||
echo "Dotnet installed."
|
||||
else
|
||||
echo "Dotnet is not installed. Please install dotnet."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo ""
|
||||
echo "Linking Nadeko Credentials"
|
||||
mv -n /opt/NadekoBot/src/NadekoBot/credentials.json /root/nadeko/credentials.json > /dev/null 2>&1
|
||||
rm /opt/NadekoBot/src/NadekoBot/credentials.json > /dev/null 2>&1
|
||||
ln -s /root/nadeko/credentials.json /opt/NadekoBot/src/NadekoBot/credentials.json > /dev/null 2>&1
|
||||
|
||||
#echo ""
|
||||
#echo "Linking Nadeko Data Folder"
|
||||
#mkdir -p /root/nadeko/data
|
||||
#rsync --ignore-existing -rt /opt/NadekoBot/src/NadekoBot/bin/Release/netcoreapp1.1/data/ /root/nadeko/data/
|
||||
#rm -rf /opt/NadekoBot/src/NadekoBot/bin/Release/netcoreapp1.1/data/ > /dev/null 2>&1
|
||||
#ln -s /root/nadeko/data/ /opt/NadekoBot/src/NadekoBot/bin/Release/netcoreapp1.1/data > /dev/null 2>&1
|
||||
|
||||
echo ""
|
||||
echo "Running NadekoBot with auto restart Please wait."
|
||||
cd NadekoBot/src/NadekoBot
|
||||
while :; do dotnet run -c Release; sleep 5s; done
|
||||
echo "Done"
|
||||
|
||||
exit 0
|
51
nadeko_installer_1_4.sh
Normal file
51
nadeko_installer_1_4.sh
Normal file
@ -0,0 +1,51 @@
|
||||
#!/bin/sh
|
||||
echo ""
|
||||
echo "NadekoBot Installer started."
|
||||
|
||||
if hash git 1>/dev/null 2>&1
|
||||
then
|
||||
echo ""
|
||||
echo "Git Installed."
|
||||
else
|
||||
echo ""
|
||||
echo "Git is not installed. Please install Git."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
if hash dotnet 1>/dev/null 2>&1
|
||||
then
|
||||
echo ""
|
||||
echo "Dotnet installed."
|
||||
else
|
||||
echo ""
|
||||
echo "Dotnet is not installed. Please install dotnet."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
root=/opt
|
||||
|
||||
cd "$root"
|
||||
|
||||
echo ""
|
||||
echo "Downloading NadekoBot, please wait."
|
||||
git clone -b weather2 --recursive --depth 1 https://github.com/mattburchett/NadekoBot.git
|
||||
echo ""
|
||||
echo "NadekoBot downloaded."
|
||||
|
||||
echo ""
|
||||
echo "Downloading Nadeko dependencies"
|
||||
cd $root/NadekoBot
|
||||
dotnet restore
|
||||
echo ""
|
||||
echo "Download done"
|
||||
|
||||
echo ""
|
||||
echo "Building NadekoBot"
|
||||
dotnet build --configuration Release
|
||||
echo ""
|
||||
echo "Building done."
|
||||
|
||||
echo ""
|
||||
echo "Installation Complete."
|
||||
exit 0
|
Reference in New Issue
Block a user