-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
60 lines (53 loc) · 1.96 KB
/
docker-compose.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
version: '2.7'
services:
client:
build:
args: [PROFILE=development]
context: ./
target: android
command: |
'
export APP=$$(sed -En "s|.*id=\"([a-z.]+)\".*|\1|p" config.xml)
export PATH=$$PATH:$$ANDROID_SDK_ROOT/platform-tools
export PATH=$$PATH:$$ANDROID_SDK_ROOT/tools/bin
export PATH=$$PATH:$$PWD/node_modules/.bin
export SRV=$$(hostname -I | cut -d" " -f1)
test -f settings-dev.json || sed -E settings.json >settings-dev.json \
-e "s|(\"profile\":) \"[^\"]+\"|\1 \"$$NODE_ENV\"|" \
-e "s|(\"baseUrl\":) \"[^\"]+\"|\1 \"http://$$SRV:8081\"|" \
-e "s|(\"rootUrl\":) \"([^\"]+)\"|\1 \"http://$$SRV:8080\2\"|" \
-e "s|(\"authUrl\":) \"([^\"]+)\"|\1 \"http://$$SRV:8080\2\"|" \
-e "s|(\"refreshUrl\":) \"([^\"]+)\"|\1 \"http://$$SRV:8080\2\"|"
mkdir -p www
npm install --also=development
cordova prepare android browser
while inotifywait -e modify -qq www; do if test -f www/index.html; then
cordova build browser
fi; done &
while inotifywait -e modify -qq www; do if test -f www/index.html; then
if adb wait-for-device && cordova run android && test -n "$$APP"; then
test -n "$$PID" && kill -0 $$PID && kill $$PID
adb logcat --pid=$$(adb shell pidof -s $$APP) & PID=$$!
fi
fi; done &
npm start
'
container_name: wooportal.client.dev
entrypoint: [sh, -c]
healthcheck: {disable: true}
image: wooportal/client:dev
network_mode: host
privileged: true
restart: on-failure
stop_signal: SIGKILL
volumes: [./:/src]
working_dir: /src
server:
build: https://github.com/wooportal/server.git#dev
command: java -jar server.jar
container_name: wooportal.server.dev
extra_hosts: [$HOSTNAME:127.0.0.1]
healthcheck: {disable: true}
image: wooportal/server:dev
network_mode: host
environment: ['SPRING_PROFILES_ACTIVE=development,staging']