Giter Site home page Giter Site logo

ikuradon / matrix-static Goto Github PK

View Code? Open in Web Editor NEW

This project forked from matrix-org/matrix-static

0.0 1.0 0.0 6.62 MB

A static golang generated preview of public world readable Matrix rooms.

Home Page: http://view.matrix.org/

License: Apache License 2.0

Go 96.92% CSS 2.41% Dockerfile 0.64% Procfile 0.03%

matrix-static's Introduction

Matrix Static

Installation

git clone or download this repository as an archive and extract then follow below instructions.

go get github.com/valyala/quicktemplate/qtc
qtc
mkdir bin && go build -o bin/ ./cmd/...

Docker

docker build -t matrix-static .
docker run -v $(pwd)/config.json:/opt/matrix-static/config.json -p 8000:8000 -it matrix-static

or for windows:

docker run -v %cd%/config.json:/opt/matrix-static/config.json -p 8000:8000 -it matrix-static

and pass any command line arguments to the end of the command.

Usage

First you must create a config, there is a sample json file provided or you can use the helper binary register-guest to register a guest on a given homeserver and write an appropriate config file.

register-guest takes the following options:

--config-file= to specify the config file, defaulting to ./config.json.

--homeserver-url= to specify the Homeserver URL to use, defaulting to https://matrix.org.

The main binary, matrix-static exhibits the following controls:

Accepts PORT= env variable to determine what port to use, defaulting to port 8000 if one is not specified. Will panic if port is in use.

Accepts the following command line arguments:

--config-file= to specify the config file, defaulting to ./config.json.

--enable-pprof if set, enables the /debug/pprof endpoints for debugging.

--enable-prometheus-metrics if set, enables the /metrics endpoint for metrics.

--num-workers= to specify the number of worker goroutines to start, defaults to 32.

--public-serve-prefix= to specify the router prefix to use for the user-facing html-serving routes, defaults to /.

--logger-directory to specify where the output logs should go.

--cache-ttl to specify how long since last access to keep a room in memory and up to date for, defaults to 30 minutes.

--cache-min-rooms to specify the minimum number of rooms to always keep in memory, defaults to 10.

Support

Currently hosted at https://view.matrix.org

Discussion Matrix Room is #matrix-static:matrix.org

matrix-static's People

Contributors

aaronraimist avatar ara4n avatar erikjohnston avatar gary-kim avatar progval avatar rreuvekamp avatar t3chguy avatar turt2live avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.