-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- simulate user server with docker to test setup server worker and au…
…toshutdown minecraft worker (related to github issue #21) - update readme - refactored env.sh
- Loading branch information
Showing
16 changed files
with
158 additions
and
75 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,4 +16,6 @@ | |
/tmp | ||
|
||
env.sh | ||
coverage/ | ||
/coverage | ||
/test-docker/id_rsa | ||
/test-docker/id_rsa.pub |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#!/bin/bash | ||
|
||
source env.sh | ||
|
||
if [[ ":$PATH:" != *":$HOME/bin:"* ]]; then | ||
PATH="$PATH:$HOME/bin" | ||
fi | ||
|
||
if [[ "$RAILS_ENV" == "production" ]] && [[ "$1" != "--bundler" ]]; then | ||
ruby "$@" | ||
else | ||
if [[ "$1" == "--bundler" ]]; then | ||
shift | ||
fi | ||
bundle exec "$@" | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,24 @@ | ||
FROM fedora:20 | ||
MAINTAINER Raekye | ||
|
||
RUN yum -y update | ||
RUN yum -y install openssh-server | ||
RUN yum -y install wget | ||
RUN yum -y install yum-plugin-security firewalld java-1.7.0-openjdk-headless python3 python3-devel python3-pip git tmux | ||
RUN ssh-keygen -t rsa -N '' -f /etc/ssh/ssh_host_rsa_key | ||
|
||
RUN mkdir /root/.ssh | ||
RUN chmod 700 /root/.ssh | ||
|
||
ADD id_rsa.pub /root/.ssh/authorized_keys | ||
RUN chmod 644 /root/.ssh/authorized_keys | ||
|
||
RUN echo 'PATH="$HOME/bin:$PATH"' >> /root/.bashrc | ||
RUN mkdir /root/bin | ||
ADD swapon.sh /root/bin/swapon | ||
RUN chmod u+x /root/bin/swapon | ||
ADD firewall-cmd.sh /root/bin/firewall-cmd | ||
RUN chmod u+x /root/bin/firewall-cmd | ||
ADD systemctl.sh /root/bin/systemctl | ||
RUN chmod u+x /root/bin/systemctl | ||
|
||
ENTRYPOINT ["/usr/sbin/sshd", "-D"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
#!/bin/bash | ||
echo 'In Docker container; skipping firewall-cmd.' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
#!/bin/bash | ||
echo 'In Docker container; skipping swapon.' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#!/bin/bash | ||
echo 'In Docker container; patching systemctl.' | ||
if [[ "$1" == "start" ]]; then | ||
cd /home/mcuser/minecraft | ||
echo | python3 /opt/gamocosm/minecraft-server_wrapper.py daemonize mcsw.pid --auth=/opt/gamocosm/mcsw-auth.txt > /dev/null 2>&1 | ||
sleep 2 | ||
curl -d '{"ram": "512M"}' "http://gamocosm-mothership:$(sed -n 2p /opt/gamocosm/mcsw-auth.txt)@localhost:5000/start" | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.