Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .envrc
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
type export_alias &>/dev/null && export_alias g "./gradlew" || true
use_nix
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@ xtend-gen/
init.gradle
config.local.yml
/org.testeditor.web.backend.xtext/repo/
start.*local.sh

### test executions ###
xvfb.error.log
xvfb.error.log

### direnv generated scripts
.direnv/
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,18 @@ server:

Having all these in place, executing `./gradlew -I init.gradle run --parallel` will automatically build the backend services with the dependency versions specified in `init.gradle` and use the `config.local.yml` when starting dropwizard.

## Running backend via docker with full pull/push of a github repo

Create a shell file 'start.test-repo-pull.local.sh' with the following content:
(make sure to have the right id_github_rsa key and the right branch name in place)
``` shell
#! /usr/bin/env bash
echo "starting persistence backend locally"
docker run -p 9080:8080 -e GIT_PRIVATE_KEY="$(cat ~/.ssh/id_github_rsa)" -e KNOWN_HOSTS_CONTENT="$(cat ~/.ssh/known_hosts)" -e TARGET_REPO=git@github.com:test-editor/language-examples.git -e BRANCH_NAME=test/pull-action testeditor/persistence:snapshot &
echo "starting xtext backend locally"
docker run -p 8080:8080 -e GIT_PRIVATE_KEY="$(cat ~/.ssh/id_github_rsa)" -e KNOWN_HOSTS_CONTENT="$(cat ~/.ssh/known_hosts)" -e TARGET_REPO=git@github.com:test-editor/language-examples.git -e BRANCH_NAME=test/pull-action testeditor/xtext:snapshot &
```

## Debugging

In order to debug the backend services you must start the backend services individually.
Expand Down
2 changes: 1 addition & 1 deletion clear_repo_cache_used_by_backends.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/bin/bash
#!/usr/bin/env bash
[ -d "org.testeditor.web.backend.persistence/repo" ] && rm -Rf org.testeditor.web.backend.persistence/repo/
[ -d "org.testeditor.web.backend.xtext/repo" ] && rm -Rf org.testeditor.web.backend.xtext/repo/
3 changes: 0 additions & 3 deletions shell.nix
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,7 @@ stdenv.mkDerivation {
];
shellHook = ''
# do some gradle "finetuning"
alias g="./gradlew"
alias g.="../gradlew"
export GRADLE_OPTS="$GRADLE_OPTS -Dorg.gradle.daemon=false -Dfile.encoding=UTF-8 -Dsun.jnu.encoding=UTF-8 "
export JAVA_TOOL_OPTIONS="$_JAVA_OPTIONS -Dfile.encoding=UTF-8 -Dsun.jnu.encoding=UTF-8"
export LC_ALL=en_US.utf8
'';
}