• Stars
    star
    153
  • Rank 243,368 (Top 5 %)
  • Language
    Elixir
  • License
    MIT License
  • Created over 6 years ago
  • Updated about 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

The MUD Chat Network

Grapevine

Grapevine

Grapevine is a MUD chat network.

WebSocket Protocol

View the websocket details on Grapevine.

Server

Requirements

This is only required to run Grapevine itself, the server. These are not required to connect as a game. See the above websocket docs for connecting as a client.

  • PostgreSQL 11
  • Elixir 1.9.0
  • Erlang 22.0.4
  • node.js 10.13.0
  • Yarn

Setup

cd apps/grapevine
mix deps.get
mix compile
yarn --cwd assets
mix ecto.reset
mix phx.server

This will start a web server on port 4100. You can now load http://localhost:4100/ to view the application.

Running Tests

MIX_ENV=test mix ecto.create
MIX_ENV=test mix ecto.migrate
mix test

Telnet Web Client

Telnet connections live in the apps/telnet application. This node holds the telnet connections so the main application can reboot on deploys and not drop active game connections.

For deployment the telnet application needs to be on its own erlang node. You can connect with something similar to:

config :grapevine,
  topologies: [
    local: [
      strategy: Cluster.Strategy.Epmd,
      config: [
        hosts: [
          :grapevine@localhost,
          :telnet@localhost,
        ]
      ]
    ]
  ]

Docker Compose

To run a production like system locally, you can use docker-compose.

The following commands will get a system running locally at http://grapevine.local. This also assumes you have something listening locally (such as nginx) that will proxy port 80 traffic to port 4100.

docker-compose build
docker-compose up -d postgres
docker-compose up -d socket
docker-compose up -d telnet
docker-compose run --rm web eval "Grapevine.ReleaseTasks.migrate()"
docker-compose run --rm web eval "Grapevine.ReleaseTasks.seed()"
docker-compose up web

Simple nginx config

This nginx config will configure your server to listen for grapevine.local and forward to either a local development server or the docker-compose setup from above.

    upstream grapevine {
            server localhost:4100;
    }

    server {
            listen 80;
            server_name grapevine.local;

            location / {
                    proxy_set_header Host $host;
                    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
                    proxy_set_header X-Real-IP $remote_addr;
                    proxy_set_header X-Forwarded-Proto $scheme;
                    proxy_http_version 1.1;
                    proxy_set_header Upgrade $http_upgrade;
                    proxy_set_header Connection "upgrade";
                    proxy_pass http://grapevine;
            }
    }

Setting up a new Play CNAME

  • Game sets the CNAME to client.grapevine.haus
  • Game must have a homepage url
  • Game must have the web client enabled
  • Update game's record for their CNAME
  • Update nginx config for new domain
  • Run certbot for the new domain
  • Refresh CNAMEs in ETS Grapevine.CNAMEs.reload()

Kubernetes

Some notes on installing into kubernetes:

# Set up nginx ingress
helm install nginx-ingress stable/nginx-ingress --set controller.publishService.enabled=true

More Repositories

1

ex_venture

Text based MMORPG engine written in Elixir
Elixir
664
star
2

kalevala

A world builder's toolkit in Elixir
Elixir
168
star
3

aino

An HTTP framework built on top of elli
Elixir
144
star
4

squabble

Simple leader election for Elixir applications
Elixir
75
star
5

hypermedia_rails

An example Rails app with a hypermedia API
Ruby
33
star
6

gossip-elixir

An Elixir client for Grapevine
Elixir
20
star
7

bookshare

Bookshare
Ruby
5
star
8

gossip-clients

Clients for the Gossip Chat Network
Python
5
star
9

spigot

A telnet test server for Grapevine's web client
Elixir
5
star
10

venture_bot

A bot for ExVenture
Elixir
4
star
11

grapevine-legacy

Grapevine player portal, part of the Gossip Network
Elixir
4
star
12

tapio

A Twitter clone to stress test Aino development
Elixir
3
star
13

grapevine-telnet

Telnet client application for Grapevine
Elixir
3
star
14

elias

UCL parser in Elixir
Elixir
3
star
15

telnet-elixir

Elixir
3
star
16

letter

rspec style lets for classes
Ruby
3
star
17

aino_new

Elixir
3
star
18

gossip-ranvier

A ranvier bundle for Gossip
JavaScript
3
star
19

nagare

A simple serializer for your Rails API.
Ruby
2
star
20

rad_example

Site hosted at http://rad-example.herokuapp.com/
Ruby
2
star
21

dotfiles

My dotfiles
Vim Script
1
star
22

ruby-mud

A MUD written in ruby
Ruby
1
star
23

jsr223_test

Java
1
star
24

lyhyt

URL shortener example for Aino
Elixir
1
star
25

listmaker

Warhammer list maker
JavaScript
1
star
26

aino_example

Very minimal example app (base for aino_new)
Elixir
1
star
27

gol-backbone

Game of Life in Backbone.js
JavaScript
1
star
28

todolist

A project app for trying out Backbone.js and Rails 3.1
JavaScript
1
star
29

heycake

heycake is a way to track callouts for your team in slack
Elixir
1
star
30

mixin_it_up_datastore

Mixin' It Up: Datastore Edition
Ruby
1
star
31

gossip-backbone

Common sync code for the Gossip "backbone"
Elixir
1
star
32

grapevine-mobile

Mobile client for Grapevine
JavaScript
1
star
33

blog.oestrich.org

CSS
1
star
34

raisin

Moderation tools for the Gossip Network
Elixir
1
star
35

lncln

lncln CMS, this was an old project I had
PHP
1
star
36

aino-rss

Elixir
1
star
37

grouter

A router written in go
Go
1
star
38

grapevine-docker

Docker images for Grapevine and other projects
Dockerfile
1
star