Merge pull request #44 from overleaf/sk-dockerize

Sk dockerize
This commit is contained in:
Shane Kilkelly 2018-11-15 09:53:00 +00:00 committed by GitHub
commit 859a4b03b3
4 changed files with 90 additions and 0 deletions

View file

@ -0,0 +1,16 @@
# Dockerfile for git-bridge
FROM ubuntu:latest
RUN apt-get update && \
apt-get install -y git make maven openjdk-8-jdk curl && \
update-alternatives --install /usr/bin/java java /usr/lib/jvm/java-8-openjdk-amd64/bin/java 100 && \
update-alternatives --install /usr/bin/javac javac /usr/lib/jvm/java-8-openjdk-amd64/bin/javac 100 && \
update-alternatives --set java /usr/lib/jvm/java-8-openjdk-amd64/bin/java && \
update-alternatives --set javac /usr/lib/jvm/java-8-openjdk-amd64/bin/javac
RUN mkdir /app
WORKDIR /app

View file

@ -0,0 +1,24 @@
# git-bridge makefile
run: package
java -jar target/writelatex-git-bridge-1.0-SNAPSHOT-jar-with-dependencies.jar conf/local.json
build:
mvn package
test:
mvn test
clean:
mvn clean
package:
mvn package
.PHONY: run package build clean test

View file

@ -93,3 +93,27 @@ The configuration file is in `.json` format.
}
You have to restart the server for configuration changes to take effect.
## Creating OAuth app
In dev-env, run `bin/run rails_v1 rake db:seed`, or, if using this solo, run the following in the v1
database:
```sql
INSERT INTO public.oauth_applications (
"name", uid, secret, redirect_uri, scopes, skip_authorization,
created_at, updated_at, partner, confidential
) VALUES (
'gitbridge',
'264c723c925c13590880751f861f13084934030c13b4452901e73bdfab226edc',
'e6b2e9eee7ae2bb653823250bb69594a91db0547fe3790a7135acb497108e62d',
'http://www.overleaf.test:5000/no-callback-required',
'git_bridge',
true,
now(),
now(),
null,
true
);
```

View file

@ -0,0 +1,26 @@
{
"port": 8000,
"rootGitDirectory": "/tmp/wlgb",
"apiBaseUrl": "http://v2.overleaf.test:4000/api/v0",
"username": "user",
"password": "pass",
"postbackBaseUrl": "http://git-bridge:8000",
"serviceName": "Overleaf",
"oauth2": {
"oauth2ClientID": "264c723c925c13590880751f861f13084934030c13b4452901e73bdfab226edc",
"oauth2ClientSecret": "e6b2e9eee7ae2bb653823250bb69594a91db0547fe3790a7135acb497108e62d",
"oauth2Server": "http://www.overleaf.test:5000"
},
"repoStore": {
"maxFileSize": 52428800
},
"swapStore": {
"type": "noop"
},
"swapJob": {
"minProjects": 50,
"lowGiB": 128,
"highGiB": 256,
"intervalMillis": 3600000
}
}