Skip to content

Instantly share code, notes, and snippets.

@gounthar
Created May 25, 2021 15:33
Show Gist options
  • Save gounthar/c203d63ef86383337b4cee59c2982553 to your computer and use it in GitHub Desktop.
Save gounthar/c203d63ef86383337b4cee59c2982553 to your computer and use it in GitHub Desktop.
version: '3'
volumes:
rethinkdb-data:
storage-temp:
services:
nginx:
build: nginx/
volumes:
- ./nginx/nginx.conf:/etc/nginx/nginx.conf
restart: unless-stopped
ports:
- 80:80
depends_on:
- app
- auth
- storage-plugin-apk
- storage-plugin-image
- storage-temp
- websocket
- api
adb:
image: devicefarmer/adb:latest
restart: unless-stopped
privileged: true
volumes:
- /dev/bus/usb:/dev/bus/usb
rethinkdb:
image: rethinkdb:2.3
restart: unless-stopped
volumes:
- rethinkdb-data:/data
command: "rethinkdb --bind all --cache-size 2048"
app:
image: devicefarmer/stf:latest
restart: unless-stopped
environment:
- RETHINKDB_PORT_28015_TCP
- SECRET
command: stf app --auth-url http://${PUBLIC_IP}/auth/mock/ --websocket-url ws://${PUBLIC_IP}/ --port 3000
depends_on:
- rethinkdb
- auth
- websocket
auth:
image: devicefarmer/stf:latest
restart: unless-stopped
environment:
- SECRET
- RETHINKDB_PORT_28015_TCP
command: stf auth-mock --app-url http://${PUBLIC_IP}/ --port 3000
depends_on:
- rethinkdb
processor:
image: devicefarmer/stf:latest
restart: unless-stopped
environment:
- RETHINKDB_PORT_28015_TCP
command: stf processor --connect-app-dealer tcp://triproxy:7160 --connect-dev-dealer tcp://dev-triproxy:7260
depends_on:
- rethinkdb
- triproxy
- dev-triproxy
triproxy:
image: devicefarmer/stf:latest
restart: unless-stopped
command: stf triproxy app --bind-pub "tcp://*:7150" --bind-dealer "tcp://*:7160" --bind-pull "tcp://*:7170"
dev-triproxy:
image: devicefarmer/stf:latest
restart: unless-stopped
command: stf triproxy dev --bind-pub "tcp://*:7250" --bind-dealer "tcp://*:7260" --bind-pull "tcp://*:7270"
migrate:
image: devicefarmer/stf:latest
environment:
- RETHINKDB_PORT_28015_TCP
command: stf migrate
depends_on:
- rethinkdb
provider:
image: devicefarmer/stf:latest
restart: unless-stopped
command: stf provider --name ${STATION_NAME} --connect-sub tcp://dev-triproxy:7250 --connect-push tcp://dev-triproxy:7270 --storage-url http://${PUBLIC_IP}/ --public-ip ${PUBLIC_IP} --heartbeat-interval 10000 --screen-ws-url-pattern "ws://${PUBLIC_IP}/d/nuc/<%= serial %>/<%= publicPort %>/" --adb-host adb --min-port 7400 --max-port 7700
ports:
- 7400-7700:7400-7700
depends_on:
- adb
- dev-triproxy
- triproxy
- storage-temp
reaper:
image: devicefarmer/stf:latest
restart: unless-stopped
environment:
- RETHINKDB_PORT_28015_TCP
depends_on:
- migrate
- rethinkdb
- dev-triproxy
- triproxy
command: stf reaper dev --connect-push tcp://dev-triproxy:7270 --connect-sub tcp://triproxy:7150 --heartbeat-timeout 30000
storage-plugin-apk:
image: devicefarmer/stf:latest
restart: unless-stopped
command: stf storage-plugin-apk --port 3000 --storage-url http://${PUBLIC_IP}/
depends_on:
- storage-temp
storage-plugin-image:
image: devicefarmer/stf:latest
restart: unless-stopped
command: stf storage-plugin-image --port 3000 --storage-url http://${PUBLIC_IP}/
depends_on:
- storage-temp
storage-temp:
build: storage-temp/
restart: unless-stopped
volumes:
- storage-temp:/app/data
command: stf storage-temp --port 3000 --save-dir /app/data
websocket:
image: devicefarmer/stf:latest
restart: unless-stopped
environment:
- SECRET
- RETHINKDB_PORT_28015_TCP
command: stf websocket --port 3000 --storage-url http://${PUBLIC_IP}/ --connect-sub tcp://triproxy:7150 --connect-push tcp://triproxy:7170
depends_on:
- migrate
- rethinkdb
- storage-temp
- triproxy
- dev-triproxy
api:
image: devicefarmer/stf:latest
restart: unless-stopped
environment:
- SECRET
- RETHINKDB_PORT_28015_TCP
command: stf api --port 3000 --connect-sub tcp://triproxy:7150 --connect-push tcp://triproxy:7170 --connect-sub-dev tcp://dev-triproxy:7250 --connect-push-dev tcp://dev-triproxy:7270
depends_on:
- migrate
- rethinkdb
- triproxy
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment