Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Run with gradle. #6

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
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
12 changes: 12 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,17 @@ jar {
)
}
}
run {
doFirst {
// Set environment variables
environment 'ADEMPIERE_APPS_TYPE', 'wildfly'
environment 'JWT_SECRET_KEY', '2C51599F5B1248F945B93E05EFC43B3A15D8EB0707C0F02FD97028786C40976F'
environment 'JWT_EXPIRATION_TIME', 86400000
}
args = [
"resources/env.yaml"
]
}

repositories {
mavenLocal()
Expand Down Expand Up @@ -101,6 +112,7 @@ sourceSets {
}
}
}

task AdempiereMobileServer(type: CreateStartScripts) {
mainClass = javaMainClass
applicationName = 'adempiere-mobile-service-server'
Expand Down
24 changes: 15 additions & 9 deletions docker-compose/.env
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
# Containers Stak
STACK_NAME="adempiere-mobile-service"

## Generic Restart
GENERIC_RESTART="always"

# Networks
DEFAULT_NETWORK="default-stack.network"



# Database
POSTGRES_IMAGE="postgres:13"
Expand All @@ -9,30 +16,29 @@ POSTGRES_PORT=5432
POSTGRES_PASSWORD="adempiere"
POSTGRES_VOLUME="${STACK_NAME}.volume_postgres"



# Adempiere UI ZK
ADEMPIERE_ZK_IMAGE="openls/adempiere-zk-ui:jetty-1.0.6"
ADEMPIERE_ZK_IMAGE="openls/adempiere-zk-ui:jetty-1.0.8"
ADEMPIERE_ZK_HOST="${STACK_NAME}.adempiere.zk"
ADEMPIERE_ZK_PORT=8080
ADEMPIERE_ZK_DB_HOST=${POSTGRES_HOST}
ADEMPIERE_ZK_DB_PORT=${POSTGRES_PORT}
ADEMPIERE_ZK_DB_NAME="adempiere"
ADEMPIERE_ZK_DB_PASSWORD=${POSTGRES_PASSWORD}



# ADempiere gRPC Server
GRPC_SERVER_IMAGE="openls/adempiere-mobile-service:alpine-1.0.2"
GRPC_SERVER_IMAGE="openls/adempiere-mobile-service:alpine-1.0.4"
GRPC_SERVER_HOST="${STACK_NAME}.adempiere.grpc.server"
GRPC_SERVER_PORT=50059
GRPC_SERVER_DB_HOST=${POSTGRES_HOST}
GRPC_SERVER_DB_PORT=${POSTGRES_PORT}
GRPC_SERVER_DB_NAME="adempiere"
GRPC_SERVER_DB_PASSWORD=${POSTGRES_PASSWORD}
GRPC_SERVER_JWT_SECRET_KEY="08AE01B0AD3E7E0554F227ADE6C00E5D52382148F4FEA8CFA1AA7BE4D9B9DE05"

GRPC_PROXY_IMAGE="envoyproxy/envoy:v1.27.0"
GRPC_PROXY_IMAGE="envoyproxy/envoy:v1.29.2"
GRPC_PROXY_HOST="${STACK_NAME}.grpc.proxy"
GRPC_PROXY_BACKEND_PORT=5555

## Generic Restart
GENERIC_RESTART="always"

# Networks
DEFAULT_NETWORK="default-stack.network"
11 changes: 10 additions & 1 deletion docker-compose/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,14 @@ services:
networks:
- shared_network



adempiere.grpc.server:
image: ${GRPC_SERVER_IMAGE}
container_name: ${GRPC_SERVER_HOST}
restart: ${GENERIC_RESTART}
healthcheck:
test: "bash -c 'printf \"GET / HTTP/1.1\n\n\" > /dev/tcp/127.0.0.1/50059; exit $?;'"
test: "bash -c 'printf \"GET / HTTP/1.1\n\n\" > /dev/tcp/127.0.0.1/${GRPC_SERVER_PORT}; exit $?;'"
interval: 10s
retries: 60
start_period: 20s
Expand All @@ -48,6 +50,8 @@ services:
networks:
- shared_network



grpc.proxy:
image: ${GRPC_PROXY_IMAGE}
container_name: ${GRPC_PROXY_HOST}
Expand All @@ -67,6 +71,8 @@ services:
networks:
- shared_network



adempiere.zk:
image: ${ADEMPIERE_ZK_IMAGE}
container_name: ${ADEMPIERE_ZK_HOST}
Expand All @@ -75,6 +81,7 @@ services:
- ${ADEMPIERE_ZK_PORT}:8080
environment:
ADEMPIERE_DB_SERVER: ${ADEMPIERE_ZK_DB_HOST}
ADEMPIERE_DB_PORT: ${ADEMPIERE_ZK_DB_PORT}
ADEMPIERE_DB_NAME: ${ADEMPIERE_ZK_DB_NAME}
ADEMPIERE_DB_PASSWORD: ${ADEMPIERE_ZK_DB_PASSWORD}
depends_on:
Expand All @@ -83,6 +90,8 @@ services:
networks:
- shared_network



networks:
shared_network:
name: ${DEFAULT_NETWORK}
Expand Down
Loading