mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
[docker] build the git-bridge in docker
Signed-off-by: Jakob Ackermann <das7pad@outlook.com>
This commit is contained in:
parent
1da276fe2b
commit
2ebae69044
3 changed files with 43 additions and 11 deletions
4
services/git-bridge/.dockerignore
Normal file
4
services/git-bridge/.dockerignore
Normal file
|
@ -0,0 +1,4 @@
|
|||
*
|
||||
!/lib
|
||||
!/src/main
|
||||
!/pom.xml
|
|
@ -13,4 +13,21 @@ RUN apt-get update && \
|
|||
|
||||
|
||||
RUN mkdir /app
|
||||
WORKDIR /app
|
||||
WORKDIR /app
|
||||
|
||||
COPY . /app
|
||||
RUN mvn clean package \
|
||||
# The name of the created jar contains the current version tag.
|
||||
# Rename it to a static path that can be used for copying.
|
||||
&& find /app/target \
|
||||
-name 'writelatex-git-bridge*jar-with-dependencies.jar' \
|
||||
-exec mv {} /git-bridge.jar \;
|
||||
|
||||
FROM openjdk:8-jre
|
||||
|
||||
USER www-data
|
||||
|
||||
ENTRYPOINT ["java", "-jar", "/git-bridge.jar"]
|
||||
CMD ["/conf/runtime.json"]
|
||||
|
||||
COPY --from=0 /git-bridge.jar /
|
||||
|
|
|
@ -1,13 +1,26 @@
|
|||
writelatex-git-bridge
|
||||
=====================
|
||||
# writelatex-git-bridge
|
||||
|
||||
## Docker
|
||||
|
||||
The `Dockerfile` contains all the requirements for building and running the
|
||||
writelatex-git-bridge.
|
||||
|
||||
```bash
|
||||
# build the image
|
||||
docker build -t writelatex-git-bridge .
|
||||
|
||||
# run it with the demo config
|
||||
docker run -v `pwd`/conf/local.json:/conf/runtime.json writelatex-git-bridge
|
||||
```
|
||||
|
||||
## Native install
|
||||
|
||||
### Required packages
|
||||
|
||||
Required
|
||||
--------
|
||||
* `maven` (for building, running tests and packaging)
|
||||
* `jdk-8` (for compiling and running)
|
||||
|
||||
Commands
|
||||
--------
|
||||
### Commands
|
||||
|
||||
To be run from the base directory:
|
||||
|
||||
|
@ -20,8 +33,7 @@ To be run from the base directory:
|
|||
**Clean**:
|
||||
`mvn clean`
|
||||
|
||||
Installation
|
||||
------------
|
||||
### Installation
|
||||
|
||||
Install dependencies:
|
||||
|
||||
|
@ -39,8 +51,7 @@ Run `mvn package` to build, test, and package it into a jar at `target/writelate
|
|||
|
||||
Use `java -jar <path_to_jar> <path_to_config_file>` to run the server.
|
||||
|
||||
Runtime Configuration
|
||||
---------------------
|
||||
## Runtime Configuration
|
||||
|
||||
The configuration file is in `.json` format.
|
||||
|
||||
|
|
Loading…
Reference in a new issue