File size: 2,025 Bytes
e12cd0f
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
services:

  postgres:
    image: "postgres:14"
    restart: always
    deploy:
      resources:
        limits:
          memory: 1G
        reservations:
          memory: 512M
    volumes:
      - $HOME/MobSF/postgresql_data:/var/lib/postgresql/data
    environment:
      - POSTGRES_USER=postgres
      - POSTGRES_PASSWORD=password
      - POSTGRES_DB=mobsf
    networks:
      - mobsf_network

  nginx:
    image: nginx:latest
    restart: always
    deploy:
      resources:
        limits:
          memory: 1G
        reservations:
          memory: 256M
    ports:
      - "80:4000"
      - "1337:4001"
    volumes:
      - ./nginx.conf:/etc/nginx/nginx.conf:ro
    depends_on:
      - mobsf
    networks:
      - mobsf_network

  djangoq:
    image: opensecurity/mobile-security-framework-mobsf:latest
    build:
      context: ..
      dockerfile: Dockerfile
    restart: unless-stopped
    command: /home/mobsf/Mobile-Security-Framework-MobSF/scripts/qcluster.sh
    volumes:
      - $HOME/MobSF/mobsf_data:/home/mobsf/.MobSF
    environment:
      - POSTGRES_USER=postgres
      - POSTGRES_PASSWORD=password
      - POSTGRES_DB=mobsf
      - POSTGRES_HOST=postgres
      - POSTGRES_PORT=5432
    depends_on:
      - postgres
    networks:
      - mobsf_network

  mobsf:
    image: opensecurity/mobile-security-framework-mobsf:latest
    build:
      context: ..
      dockerfile: Dockerfile
    restart: always
    tty: true
    volumes:
      - $HOME/MobSF/mobsf_data:/home/mobsf/.MobSF
    environment:
      - POSTGRES_USER=postgres
      - POSTGRES_PASSWORD=password
      - POSTGRES_DB=mobsf
      - POSTGRES_HOST=postgres
      - POSTGRES_PORT=5432
      - MOBSF_ASYNC_ANALYSIS=1
    healthcheck:
      test: curl -f http://localhost:8000/login/ || exit 1
      interval: 30s
      timeout: 10s
      retries: 5
    depends_on:
      - postgres
      - djangoq
    networks:
      - mobsf_network
    extra_hosts:
      - "host.docker.internal:host-gateway"

networks:
  mobsf_network:
    driver: bridge