forked from bisq-network/incubator-bisq-api
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Bernard Labno
committed
Oct 11, 2019
1 parent
c8e5778
commit 51aff9a
Showing
6 changed files
with
188 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
.git | ||
.gitignore | ||
.dockerignore | ||
docker-compose.yml | ||
docker-compose-base.yml | ||
Dockerfile | ||
docker/dev/Dockerfile | ||
docker/prod/Dockerfile | ||
|
||
.idea | ||
*.iml | ||
|
||
target | ||
support | ||
|
||
build | ||
out |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
version: '2.1' | ||
|
||
services: | ||
api: | ||
build: | ||
context: .. | ||
dockerfile: api/docker/dev/Dockerfile | ||
image: bisq/api | ||
environment: | ||
- LOG_LEVEL=debug | ||
- USE_LOCALHOST_FOR_P2P=true | ||
- USE_DEV_PRIVILEGE_KEYS=true | ||
- SEED_NODES=seed:8000 | ||
- BTC_NODES=bitcoin:18444 | ||
- BASE_CURRENCY_NETWORK=BTC_REGTEST | ||
- BITCOIN_REGTEST_HOST=NONE | ||
- HTTP_API_HOST=0.0.0.0 | ||
- ENABLE_HTTP_API_EXPERIMENTAL_FEATURES=true | ||
seed: | ||
image: bisq/seednode | ||
environment: | ||
- MY_ADDRESS=seed:8000 | ||
- SEED_NODES=seed:8000 | ||
- BTC_NODES=bitcoin:18444 | ||
- USE_LOCALHOST_FOR_P2P=true | ||
- BASE_CURRENCY_NETWORK=BTC_REGTEST | ||
- BITCOIN_REGTEST_HOST=NONE | ||
bitcoin: | ||
image: bisq/bitcoind:latest | ||
command: -logips -rpcallowip=::/0 -regtest -printtoconsole | ||
environment: | ||
- DISABLEWALLET=0 | ||
- RPCUSER=user | ||
- RPCPASSWORD=password |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
version: '2.1' | ||
|
||
services: | ||
alice: | ||
extends: | ||
file: docker-compose-base.yml | ||
service: api | ||
ports: | ||
- 8080:8080 | ||
environment: | ||
- NODE_PORT=8003 | ||
links: | ||
- seed | ||
- bitcoin | ||
bob: | ||
extends: | ||
file: docker-compose-base.yml | ||
service: api | ||
ports: | ||
- 8081:8080 | ||
environment: | ||
- NODE_PORT=8004 | ||
links: | ||
- seed | ||
- bitcoin | ||
arbitrator: | ||
extends: | ||
file: docker-compose-base.yml | ||
service: api | ||
ports: | ||
- 8082:8080 | ||
environment: | ||
- NODE_PORT=8005 | ||
links: | ||
- seed | ||
- bitcoin | ||
seed: | ||
extends: | ||
file: docker-compose-base.yml | ||
service: seed | ||
ports: | ||
- 8000:8000 | ||
links: | ||
- bitcoin | ||
bitcoin: | ||
extends: | ||
file: docker-compose-base.yml | ||
service: bitcoin | ||
ports: | ||
# If it is default regtest port (18444) then bisq ignores btcNodes param and uses localhost | ||
- 18445:18444 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
FROM openjdk:10-jdk | ||
|
||
RUN apt-get update && apt-get install -y --no-install-recommends \ | ||
openjfx && rm -rf /var/lib/apt/lists/* | ||
|
||
WORKDIR /bisq/api | ||
|
||
#ENV HTTP_API_HOST= | ||
#ENV HTTP_API_PORT= | ||
ENV LANG=en_US | ||
|
||
CMD ./docker/startApi.sh | ||
|
||
#Fetch gradle and dependencies | ||
COPY gradle /bisq/gradle/ | ||
COPY gradlew build.gradle gradle.properties settings.gradle /bisq/ | ||
RUN ../gradlew --no-daemon -v | ||
|
||
COPY assets /bisq/assets/ | ||
COPY common /bisq/common/ | ||
COPY core /bisq/core/ | ||
COPY p2p /bisq/p2p/ | ||
COPY pricenode /bisq/pricenode/ | ||
RUN ../gradlew --no-daemon build -x test | ||
|
||
COPY api /bisq/api | ||
|
||
#Compile sources to speed up startup | ||
RUN ../gradlew --no-daemon --offline compileJava -x test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
#!/bin/bash | ||
|
||
ARGS="" | ||
if [ ! -z "$APP_NAME" ]; then | ||
ARGS="$ARGS --appName=$APP_NAME" | ||
fi | ||
if [ ! -z "$NODE_PORT" ]; then | ||
ARGS="$ARGS --nodePort=$NODE_PORT" | ||
fi | ||
if [ ! -z "$USE_LOCALHOST_FOR_P2P" ]; then | ||
ARGS="$ARGS --useLocalhostForP2P=$USE_LOCALHOST_FOR_P2P" | ||
fi | ||
if [ ! -z "$SEED_NODES" ]; then | ||
ARGS="$ARGS --seedNodes=$SEED_NODES" | ||
fi | ||
if [ ! -z "$BTC_NODES" ]; then | ||
ARGS="$ARGS --btcNodes=$BTC_NODES" | ||
fi | ||
if [ ! -z "$BITCOIN_REGTEST_HOST" ]; then | ||
ARGS="$ARGS --bitcoinRegtestHost=$BITCOIN_REGTEST_HOST" | ||
fi | ||
if [ ! -z "$BASE_CURRENCY_NETWORK" ]; then | ||
ARGS="$ARGS --baseCurrencyNetwork=$BASE_CURRENCY_NETWORK" | ||
fi | ||
if [ ! -z "$LOG_LEVEL" ]; then | ||
ARGS="$ARGS --logLevel=$LOG_LEVEL" | ||
fi | ||
if [ ! -z "$USE_DEV_PRIVILEGE_KEYS" ]; then | ||
ARGS="$ARGS --useDevPrivilegeKeys=$USE_DEV_PRIVILEGE_KEYS" | ||
fi | ||
if [ "$ENABLE_HTTP_API_EXPERIMENTAL_FEATURES" == "true" ]; then | ||
ARGS="$ARGS --enableHttpApiExperimentalFeatures" | ||
fi | ||
if [ ! -z "$HTTP_API_PORT" ]; then | ||
ARGS="$ARGS --httpApiPort=$HTTP_API_PORT" | ||
fi | ||
if [ ! -z "$HTTP_API_HOST" ]; then | ||
ARGS="$ARGS --httpApiHost=$HTTP_API_HOST" | ||
fi | ||
|
||
echo ../gradlew run --no-daemon --args "foo $ARGS" | ||
../gradlew run --no-daemon --args "foo $ARGS" |