-
Notifications
You must be signed in to change notification settings - Fork 4
/
docker-compose.yml
62 lines (59 loc) · 2.12 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
61
62
version: '3'
services:
znca-api:
# build: .
image: samuelthomas2774/nxapi-znca-api
command:
- android-frida-server
- redroid
- --resolve-multiple-devices-docker
- --frida-server-path
- /system/bin/frida-server
- --start-method
- ${ZNCA_API_APP_START_METHOD:-spawn}
- --rate-limit
# 10 requests/60 minutes
- ${ZNCA_API_RATE_LIMIT_CORAL:-10/3600}
- --rate-limit-webservice
# 20 requests/30 minutes
- ${ZNCA_API_RATE_LIMIT_WEBSERVICE:-20/1800}
- --listen
- '[::]:80'
- --metrics
restart: unless-stopped
labels:
- traefik.enable=true
- traefik.http.routers.${TRAEFIK_ROUTER:-nxapi-znca}.entrypoints=websecure
- traefik.http.routers.${TRAEFIK_ROUTER:-nxapi-znca}.rule=Host(`${TRAEFIK_HOST:-nxapi.ta.fancy.org.uk}`) && PathPrefix(`/api/znca/`)
- traefik.http.routers.${TRAEFIK_ROUTER:-nxapi-znca}.tls=true
- traefik.http.services.${TRAEFIK_ROUTER:-nxapi-znca}.loadbalancer.server.port=80
environment:
DEBUG: '*,-express:*,-body-parser:*'
volumes:
- data:/data
- /var/run/docker.sock:/var/run/docker.sock
healthcheck:
test: [ "CMD", "curl", "http://127.0.0.1:80/api/znca/health" ]
timeout: 45s
interval: 10s
retries: 10
# The binder and ashmem kernel modules must be loaded on the host before
# this service starts (see https://github.com/remote-android/redroid-doc)
redroid:
build:
context: redroid-coral
args:
REDROID_IMAGE: ${REDROID_IMAGE:-redroid/redroid:12.0.0_64only-latest}
CORAL_APK_URL: ${CORAL_APK_URL}
CORAL_APK_VERSION: ${CORAL_APK_VERSION:-2.4.0}
CORAL_APK_BUILD: ${CORAL_APK_BUILD:-3467}
# shasum -a 256 com.nintendo.znca-2.4.0.apk
CORAL_APK_HASH_SHA256: ${CORAL_APK_HASH_SHA256:-da0cf5647a855cadf7f69e02815d3fdf9d7ab3d568fe809f8b8ff47598016d0d}
restart: unless-stopped
privileged: true
healthcheck:
test: [ "CMD", "sh", "-c", "[ \"\\`netstat -lnt | awk '\\$6 == \"LISTEN\" && \\$4 ~ /\\:5555$/'\\`\" != \"\" ]" ]
timeout: 10s
start_period: 2m
volumes:
data: