mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-11-14 22:23:42 +01:00
Generate a config file from env vars and template
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
*
|
||||
!start.sh
|
||||
!/conf
|
||||
!/lib
|
||||
!/src/main
|
||||
!/pom.xml
|
||||
|
||||
@@ -21,14 +21,19 @@ RUN make package \
|
||||
|
||||
FROM openjdk:8-jre
|
||||
|
||||
RUN apt-get update && apt-get install -y git \
|
||||
RUN apt-get update && apt-get install -y git gettext-base\
|
||||
&& rm -rf /var/lib/apt/lists
|
||||
|
||||
RUN useradd --create-home node
|
||||
|
||||
ENTRYPOINT ["java", "-jar", "/git-bridge.jar"]
|
||||
CMD ["/conf/runtime.json"]
|
||||
CMD ["/start.sh"]
|
||||
|
||||
COPY --from=builder /git-bridge.jar /
|
||||
|
||||
COPY conf/envsubst_template.json envsubst_template.json
|
||||
COPY start.sh start.sh
|
||||
|
||||
RUN mkdir conf
|
||||
RUN chown node:node conf
|
||||
|
||||
USER node
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
{
|
||||
"port": 8080,
|
||||
"rootGitDirectory": "/tmp/wlgb",
|
||||
"apiBaseUrl": "https://localhost/api/v0",
|
||||
"username": "$GITBRIDGE_USERNAME",
|
||||
"password": "$GITBRIDGE_PASSWORD",
|
||||
"postbackBaseUrl": "https://localhost",
|
||||
"serviceName": "Overleaf",
|
||||
"oauth2": {
|
||||
"oauth2ClientID": "$GITBRIDGE_OAUTH2_CLIENT_ID",
|
||||
"oauth2ClientSecret": "$GITBRIDGE_OAUTH2_CLIENT_SECRET",
|
||||
"oauth2Server": "https://localhost"
|
||||
},
|
||||
"repoStore": {
|
||||
"maxFileNum": 2000,
|
||||
"maxFileSize": 52428800
|
||||
},
|
||||
"swapStore": {
|
||||
"type": "s3",
|
||||
"awsAccessKey": "asdf",
|
||||
"awsSecret": "asdf",
|
||||
"s3BucketName": "com.overleaf.testbucket",
|
||||
"awsRegion": "us-east-1"
|
||||
},
|
||||
"swapJob": {
|
||||
"minProjects": 50,
|
||||
"lowGiB": 128,
|
||||
"highGiB": 256,
|
||||
"intervalMillis": 3600000,
|
||||
"compressionMethod": "gzip"
|
||||
}
|
||||
}
|
||||
Executable
+3
@@ -0,0 +1,3 @@
|
||||
#!/bin/bash
|
||||
envsubst < /envsubst_template.json > /conf/runtime.json
|
||||
java -jar /git-bridge.jar /conf/runtime.json
|
||||
Reference in New Issue
Block a user