Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updating documentation #50

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 12 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,27 +7,32 @@ for running a Minecraft server in a [dyno](https://devcenter.heroku.com/articles

## Usage

Create a [free ngrok account](https://ngrok.com/) and copy your Auth token. Then create a new Git project with a `eula.txt` file:
Create a [free ngrok account](https://ngrok.com/) and copy your Auth token. Then follow these instructions:

```sh-session
$ echo 'eula=true' > eula.txt
$ echo 's3cmd' > requirements.txt
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this file is already in the Git repo, why do you need this?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's because some people reported problems with this.

Copy link

@mtimoustafa mtimoustafa Oct 4, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Second this - looks like the Python buildpack fails on not finding any expected files. This is before this buildpack is hit, so I'm assuming that's why it doesn't see the requirements.txt file 🤔

When I ran into that issue, manually adding an empty requirements.txt file fixed the issue. Though I'm not familiar with Python, so I don't know what s3cmd is.

$ echo '' > wakemydyno.txt
$ git init
$ git add eula.txt
$ git add requirements.txt
$ git commit -m "first commit"
```

Then, install the [Heroku toolbelt](https://toolbelt.heroku.com/).
Create a Heroku app, set your ngrok token, and push:
Make sure to run ```heroku login``` if you just installed it and it's your first time using it on your machine.
Follow this set of commands:

```sh-session
$ heroku create
$ heroku create yourapp
$ heroku git:remote -a yourapp
$ heroku buildpacks:add heroku/python
$ heroku buildpacks:add heroku/jvm
$ heroku buildpacks:add jkutner/minecraft
$ heroku config:set NGROK_API_TOKEN="xxxxx"
$ git push heroku master
```

After that, go on http://wakemydyno.com/ and paste the url of your app to it
Finally, open the app:

```sh-session
Expand All @@ -44,6 +49,8 @@ Server available at: 0.tcp.ngrok.io:17003
Copy the `0.tcp.ngrok.io:17003` part, and paste it into your local Minecraft app
as the server name.



## Syncing to S3

The Heroku filesystem is [ephemeral](https://devcenter.heroku.com/articles/dynos#ephemeral-filesystem),
Expand Down Expand Up @@ -72,7 +79,7 @@ Once you have Heroku Exec installed, you can connect to the console using
```
$ heroku ps:exec
Establishing credentials... done
Connecting to web.1 on ⬢ lovely-minecraft-2351...
Connecting to web.1 on ⬢ yourapp...
$ screen -r minecraft
```

Expand Down
2 changes: 1 addition & 1 deletion bin/compile
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ CACHE_DIR=$2
OPT_DIR=$BP_DIR/../opt/

export_env_dir $3

#echo 's3cmd' >> $BUILD_DIR/requirements.txt
APT_CACHE_DIR="$CACHE_DIR/apt/cache"
APT_STATE_DIR="$CACHE_DIR/apt/state"
APT_OPTIONS="-o debug::nolocking=true -o dir::cache=$APT_CACHE_DIR -o dir::state=$APT_STATE_DIR"
Expand Down
2 changes: 1 addition & 1 deletion opt/index.rhtml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<% open('ngrok.log') do |f| %>
<% f.lines.select { |line| line.include?("URL:") }.each do |line| %>
Server available at: <%= line.match(/tcp:\/\/(.+:[0-9]+) /)[1] %>
<div style="text-align:center; font-size: 30; font-family: \"Comic Sans MS\", cursive, sans-serif">Server available at: <%= line.match(/tcp:\/\/(.+:[0-9]+) /)[1] %></div>
<br />
<% end %>
<% end %>
1 change: 1 addition & 0 deletions wakemydyno.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@