-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
52 lines (50 loc) · 1.41 KB
/
docker-compose.yml
File metadata and controls
52 lines (50 loc) · 1.41 KB
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
version: '3.8'
services:
server:
build:
context: ./express-backend
ports:
- "8080:8080"
volumes:
- ./build:/app/build
- ./shared:/shared
env_file:
- ./express-backend/.env
command: ["npx", "ts-node", "index.ts"]
restart: always
client_mobile:
build:
context: ./react-frontend
volumes:
- ./react-frontend:/app
- ./shared:/shared
env_file:
- ./react-frontend/.env2
command: |
sh -c "npm install &&
npm run build &&
npx cap copy &&
npx cap sync &&
cd android &&
if [ ! -d /android-sdk/cmdline-tools/latest ]; then
mkdir -p /android-sdk/cmdline-tools/latest &&
mv /android-sdk/cmdline-tools/* /android-sdk/cmdline-tools/latest/;
fi &&
yes | /android-sdk/cmdline-tools/latest/bin/sdkmanager --licenses &&
/android-sdk/cmdline-tools/latest/bin/sdkmanager 'platforms;android-34' 'build-tools;34.0.0' &&
./gradlew assembleRelease &&
mv app/build/outputs/apk/release/app-release.apk /shared/client.apk"
restart: always
client_web:
build:
context: ./react-frontend
ports:
- "8081:8081"
volumes:
- ./react-frontend:/app
- ./shared:/shared
command: ["npm", "start"]
depends_on:
- server
- client_mobile
restart: always