Skip to content
This repository was archived by the owner on May 30, 2023. It is now read-only.

Commit 32cddd1

Browse files
authored
Merge pull request #91 from matrix-org/develop
0.3.0
2 parents 668241f + c2eb819 commit 32cddd1

File tree

1,481 files changed

+1088
-581867
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,481 files changed

+1088
-581867
lines changed

.dockerignore

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Created by .ignore support plugin (hsz.mobi)
2+
### Go template
3+
# Binaries for programs and plugins
4+
*.exe
5+
*.exe~
6+
*.dll
7+
*.so
8+
*.dylib
9+
10+
# Test binary, built with `go test -c`
11+
*.test
12+
13+
# Output of the go coverage tool, specifically when used with LiteIDE
14+
*.out
15+
16+
# Binaries
17+
bin/
18+
# Dependency directories
19+
vendor/
20+
Dockerfile
21+
.dockerignore
22+

.travis.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
language: go
22
go:
3-
- 1.8
4-
- tip
3+
- 1.13
54
install:
6-
- go get github.com/constabulary/gb/...
75
- go get github.com/valyala/quicktemplate/qtc
86
- qtc
97
script:
10-
- gb build
8+
- go build ./cmd/...
9+
- go test ./...

Dockerfile

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
1-
FROM golang:1.11-alpine
1+
FROM golang:1.13-alpine
2+
3+
RUN apk --update add git gcc musl-dev
4+
RUN go get github.com/valyala/quicktemplate/qtc
25

3-
COPY . /src
46
WORKDIR /src
7+
COPY . /src
58

6-
RUN apk --update add git
7-
RUN go get github.com/constabulary/gb/...
8-
RUN go get github.com/valyala/quicktemplate/qtc
99
RUN qtc
10-
RUN gb build
10+
RUN go build ./cmd/matrix-static
1111

1212
FROM alpine
1313

1414
# We need this otherwise we don't have a good list of CAs
1515
RUN apk --update add ca-certificates && mkdir /opt/matrix-static
1616

1717
WORKDIR /opt/matrix-static/
18-
COPY --from=0 /src/bin/* /bin/
19-
COPY --from=0 /src/assets ./assets
18+
COPY --from=0 /src/matrix-static /bin/
19+
COPY ./assets/ ./assets
2020

21-
CMD ["matrix-static"]
21+
ENTRYPOINT matrix-static

README.md

Lines changed: 21 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,23 @@ Matrix Static
55
`git clone` or download this repository as an archive and extract then follow below instructions.
66

77
```
8-
go get github.com/constabulary/gb/...
98
go get github.com/valyala/quicktemplate/qtc
109
qtc
11-
gb build
10+
go build -o bin/ ./cmd/...
1211
```
13-
After this, executables will be in the `bin` directory.
1412

13+
### Docker
14+
```shell
15+
docker build -t matrix-static .
16+
docker run -v $(pwd)/config.json:/opt/matrix-static/config.json -p 8000:8000 -it matrix-static
17+
```
18+
19+
or for windows:
20+
```shell script
21+
docker run -v %cd%/config.json:/opt/matrix-static/config.json -p 8000:8000 -it matrix-static
22+
```
23+
24+
and pass any command line arguments to the end of the command.
1525

1626
### Usage
1727
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.
@@ -36,9 +46,15 @@ Accepts the following command line arguments:
3646

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

39-
`--num-workers=` to specify the number of worker goroutines to start, defaults to 32
49+
`--num-workers=` to specify the number of worker goroutines to start, defaults to 32.
50+
51+
`--public-serve-prefix=` to specify the router prefix to use for the user-facing html-serving routes, defaults to `/`.
52+
53+
`--logger-directory` to specify where the output logs should go.
54+
55+
`--cache-ttl` to specify how long since last access to keep a room in memory and up to date for, defaults to 30 minutes.
4056

41-
`--public-serve-prefix=` to specify the router prefix to use for the user-facing html-serving routes, defaults to `/`
57+
`--cache-min-rooms` to specify the minimum number of rooms to always keep in memory, defaults to 10.
4258

4359

4460

0 commit comments

Comments
 (0)