github.com/mysteriumnetwork/node@v0.0.0-20240516044423-365054f76801/docker-compose.localnet.yml (about)

     1  version: '3.0'
     2  
     3  services:
     4    morqa:
     5      image: mysteriumnetwork/quality-oracle:latest
     6      command: >
     7        --bind-addr=:8085
     8        --prometheus=http://prometheus:9090
     9        --metrics-addr=:8080
    10      depends_on:
    11        - prometheus
    12      expose:
    13        - 8085
    14        - 8080
    15      cap_add:
    16        - NET_ADMIN
    17      sysctls:
    18        - net.ipv4.conf.default.rp_filter=0
    19        - net.ipv4.conf.all.rp_filter=0
    20        - net.ipv4.conf.eth0.rp_filter=0
    21        - net.ipv4.conf.eth1.rp_filter=0
    22      dns: 172.30.0.254
    23      networks:
    24        public0:
    25          ipv4_address: 172.30.0.198
    26        public1:
    27          ipv4_address: 172.31.0.198
    28  
    29    prometheus:
    30      image: prom/prometheus:v2.10.0
    31      volumes:
    32        - ./e2e/prometheus:/prometheus
    33      command:
    34        - '--config.file=/prometheus/prometheus-local.yml'
    35        - '--storage.tsdb.path=/data'
    36      expose:
    37        - 9090
    38      dns: 172.30.0.254
    39      networks:
    40        public0:
    41          ipv4_address: 172.30.0.199
    42        public1:
    43          ipv4_address: 172.31.0.199
    44  
    45    ipify:
    46      image: owlab/ipify
    47      expose:
    48        - 3000
    49      cap_add:
    50        - NET_ADMIN
    51      sysctls:
    52        - net.ipv4.conf.default.rp_filter=0
    53        - net.ipv4.conf.all.rp_filter=0
    54        - net.ipv4.conf.eth0.rp_filter=0
    55        - net.ipv4.conf.eth1.rp_filter=0
    56      dns: 172.30.0.254
    57      networks:
    58        public0:
    59          ipv4_address: 172.30.0.10
    60        public1:
    61          ipv4_address: 172.31.0.10
    62  
    63    broker-real:
    64      image: nats:1.0.4
    65      expose:
    66        - 4222
    67      cap_add:
    68        - NET_ADMIN
    69      sysctls:
    70        - net.ipv4.conf.default.rp_filter=0
    71        - net.ipv4.conf.all.rp_filter=0
    72        - net.ipv4.conf.eth0.rp_filter=0
    73        - net.ipv4.conf.eth1.rp_filter=0
    74      dns: 172.30.0.254
    75      networks:
    76        public0:
    77          ipv4_address: 172.30.0.30
    78        public1:
    79          ipv4_address: 172.31.0.30
    80  
    81    broker:
    82      image: mysteriumnetwork/nats-proxy:1.0.1
    83      depends_on:
    84        - broker-real
    85      expose:
    86        - 4222
    87      cap_add:
    88        - NET_ADMIN
    89      sysctls:
    90        - net.ipv4.conf.default.rp_filter=0
    91        - net.ipv4.conf.all.rp_filter=0
    92        - net.ipv4.conf.eth0.rp_filter=0
    93        - net.ipv4.conf.eth1.rp_filter=0
    94      dns: 172.30.0.254
    95      networks:
    96        public0:
    97          ipv4_address: 172.30.0.31
    98        public1:
    99          ipv4_address: 172.31.0.31
   100  
   101    db:
   102      image: percona:5.7
   103      cap_add:
   104        - NET_ADMIN
   105      restart: always
   106      expose:
   107        - 3306
   108      environment:
   109        MYSQL_ROOT_PASSWORD: root
   110        MYSQL_DATABASE: myst_api
   111        MYSQL_USER: myst_api
   112        MYSQL_PASSWORD: myst_api
   113      dns: 172.30.0.254
   114      networks:
   115        public0:
   116          ipv4_address: 172.30.0.201
   117        public1:
   118          ipv4_address: 172.31.0.201
   119  
   120    mysterium-api:
   121      image: mysteriumnetwork/mysterium-api:0.5.22
   122      expose:
   123        - 8001
   124      cap_add:
   125        - NET_ADMIN
   126      sysctls:
   127        - net.ipv4.conf.default.rp_filter=0
   128        - net.ipv4.conf.all.rp_filter=0
   129        - net.ipv4.conf.eth0.rp_filter=0
   130        - net.ipv4.conf.eth1.rp_filter=0
   131      environment:
   132        APP_PORT: 8001
   133        DB_HOST: db
   134        DB_NAME: myst_api
   135        DB_USER: myst_api
   136        DB_PASSWORD: myst_api
   137        ETHER_RPC_URL: "http://ganache:8545"
   138        IDENTITY_CONTRACT: "0x1955141ba8e77a5B56efBa8522034352c94f77Ea"
   139        ETHER_MINING_MODE: "poa"
   140        DISCOVERY_VERIFY_IDENTITY: "false"
   141      depends_on:
   142        - db
   143        - ganache
   144      dns: 172.30.0.254
   145      networks:
   146        public0:
   147          ipv4_address: 172.30.0.200
   148        public1:
   149          ipv4_address: 172.31.0.200
   150  
   151    # private blockchain
   152    ganache:
   153      image: trufflesuite/ganache-cli:v6.6.0-beta.0
   154      expose:
   155        - 8545
   156      command: >
   157        --mnemonic "amused glory pen avocado toilet dragon entry kitchen cliff retreat canyon danger"
   158      dns: 172.30.0.254
   159      sysctls:
   160        - net.ipv4.conf.default.rp_filter=0
   161        - net.ipv4.conf.all.rp_filter=0
   162        - net.ipv4.conf.eth0.rp_filter=0
   163        - net.ipv4.conf.eth1.rp_filter=0
   164      networks:
   165        public0:
   166          ipv4_address: 172.30.0.202
   167        public1:
   168          ipv4_address: 172.31.0.202
   169  
   170    transactor:
   171      image: mysteriumnetwork/transactor:0.1.0
   172      environment:
   173        PORT: 8888
   174      expose:
   175        - 8888
   176      sysctls:
   177        - net.ipv4.conf.default.rp_filter=0
   178        - net.ipv4.conf.all.rp_filter=0
   179        - net.ipv4.conf.eth0.rp_filter=0
   180        - net.ipv4.conf.eth1.rp_filter=0
   181      depends_on:
   182        - ganache
   183      command: >
   184        -mystSCAddress 0xaa9c4e723609cb913430143fbc86d3cbe7adca21
   185        -rpcEndpoint http://ganache:8545
   186        -registry 0xbe180c8CA53F280C7BE8669596fF7939d933AA10
   187        -ourIdentity 0x354bd098b4ef8c9e70b7f21be2d455df559705d7
   188        -chImplementation 0x599d43715DF3070f83355D9D90AE62c159E62A75
   189        -balanceCheckInterval 1s
   190      volumes:
   191        - ./e2e/blockchain/keystore:/keystore
   192      dns: 172.30.0.254
   193      networks:
   194        public0:
   195          ipv4_address: 172.30.0.203
   196        public1:
   197          ipv4_address: 172.31.0.203
   198  
   199    hermes:
   200      image: mysteriumnetwork/accountant:0.2
   201      environment:
   202        PORT: 8889
   203      expose:
   204        - 8889
   205      sysctls:
   206        - net.ipv4.conf.default.rp_filter=0
   207        - net.ipv4.conf.all.rp_filter=0
   208        - net.ipv4.conf.eth0.rp_filter=0
   209        - net.ipv4.conf.eth1.rp_filter=0
   210      depends_on:
   211        - ganache
   212        - mongodb
   213      command: >
   214        -identityPassphrase ""
   215        -myst 0xaa9c4e723609cb913430143fbc86d3cbe7adca21
   216        -rpcEndpoint http://ganache:8545
   217        -registry 0xbe180c8CA53F280C7BE8669596fF7939d933AA10
   218        -operator 0x354bd098b4ef8c9e70b7f21be2d455df559705d7
   219        -chImplementation 0x599d43715DF3070f83355D9D90AE62c159E62A75
   220        -keystoreDir /keystore
   221        -hermesAddress 0x427c2bad22335710aec5e477f3e3adcd313a9bcb
   222        -MongoUser hermes
   223        -MongoPass hermes
   224        -MongoHost "mongodb:27017"
   225        -MongoReplSet ""
   226      volumes:
   227        - ./e2e/blockchain/keystore:/keystore
   228      dns: 172.30.0.254
   229      networks:
   230        public0:
   231          ipv4_address: 172.30.0.204
   232        public1:
   233          ipv4_address: 172.31.0.204
   234  
   235    mongodb:
   236      image: 'mongo:4.2.3'
   237      environment:
   238        - MONGO_INITDB_ROOT_PASSWORD=root
   239        - MONGO_INITDB_ROOT_USERNAME=root
   240        - MONGO_INITDB_DATABASE=hermes
   241        - MONGO_NON_ROOT_USERNAME=hermes
   242        - MONGO_NON_ROOT_PASSWORD=hermes
   243      dns: 172.30.0.254
   244      networks:
   245        public0:
   246          ipv4_address: 172.30.0.205
   247        public1:
   248          ipv4_address: 172.31.0.205
   249      expose:
   250        - 27017
   251        - 27018
   252        - 27019
   253      volumes:
   254        - ./e2e/mongo-init.e2e.js:/docker-entrypoint-initdb.d/mongo-init.js:ro
   255  
   256    myst-consumer:
   257      build:
   258        context: .
   259        dockerfile: ./localnet/node/Dockerfile
   260      environment:
   261        - DEFAULT_ROUTE=10.100.1.2
   262      depends_on:
   263        - forwarder
   264        - broker
   265        - mysterium-api
   266        - ipify
   267        - transactor
   268        - hermes
   269        - morqa
   270      cap_add:
   271        - NET_ADMIN
   272      devices:
   273        - /dev/net/tun
   274      expose:
   275        - 4050
   276      volumes:
   277      - ./localnet/volume/consumer:/var/lib/mysterium-node
   278      - ./:/node
   279      dns: 172.30.0.254
   280      networks:
   281        priv1:
   282          ipv4_address: 10.100.1.101
   283  
   284    myst-provider:
   285      build:
   286        context: .
   287        dockerfile: ./localnet/node/Dockerfile
   288      environment:
   289        - DEFAULT_ROUTE=10.100.0.2
   290      depends_on:
   291        - forwarder2
   292        - broker
   293        - mysterium-api
   294        - ipify
   295        - transactor
   296        - hermes
   297        - morqa
   298      cap_add:
   299        - NET_ADMIN
   300      devices:
   301        - /dev/net/tun
   302      expose:
   303        - 1194
   304        - 4050
   305      volumes:
   306        - ./localnet/volume/provider:/var/lib/mysterium-node
   307        - ./:/node
   308      dns: 172.31.0.254
   309      networks:
   310        priv0:
   311          ipv4_address: 10.100.0.102
   312  
   313    go-runner:
   314      build:
   315        context: .
   316        dockerfile: ./e2e/gorunner/Dockerfile
   317      volumes:
   318        - ./:/node
   319        - $GOPATH/pkg/mod:/go/pkg/mod
   320      working_dir: /node
   321      dns: 172.30.0.254
   322      cap_add:
   323        - NET_ADMIN
   324      networks:
   325        public0:
   326          ipv4_address: 172.30.0.222
   327        public1:
   328          ipv4_address: 172.31.0.222
   329        priv0:
   330          ipv4_address: 10.100.0.222
   331        priv1:
   332          ipv4_address: 10.100.1.222
   333  
   334    router:
   335      build:
   336        context: .
   337        dockerfile: ./e2e/forwarder/Dockerfile
   338      cap_add:
   339        - NET_ADMIN
   340      environment:
   341        - EXT_NAT=172.30.0.1
   342      networks:
   343        public0:
   344          ipv4_address: 172.30.0.254
   345        public1:
   346          ipv4_address: 172.31.0.254
   347  
   348    forwarder:
   349      build:
   350        context: .
   351        dockerfile: ./e2e/forwarder/Dockerfile
   352      cap_add:
   353        - NET_ADMIN
   354      depends_on:
   355        - router
   356      environment:
   357        - GATEWAY=172.30.0.254
   358      networks:
   359        public0:
   360          ipv4_address: 172.30.0.2
   361        priv1:
   362          ipv4_address: 10.100.1.2
   363  
   364    forwarder2:
   365      build:
   366        context: .
   367        dockerfile: ./e2e/forwarder/Dockerfile
   368      cap_add:
   369        - NET_ADMIN
   370      depends_on:
   371        - router
   372      environment:
   373        - GATEWAY=172.31.0.254
   374      dns: 172.31.0.254
   375      networks:
   376        public1:
   377          ipv4_address: 172.31.0.2
   378        priv0:
   379          ipv4_address: 10.100.0.2
   380  
   381  networks:
   382    public0:
   383      driver: "bridge"
   384      ipam:
   385        driver: default
   386        config:
   387          - subnet: 172.30.0.0/24
   388    public1:
   389      driver: "bridge"
   390      ipam:
   391        config:
   392          - subnet: 172.31.0.0/24
   393    priv0:
   394      driver: "bridge"
   395      ipam:
   396        config:
   397          - subnet: 10.100.0.0/24
   398    priv1:
   399      driver: "bridge"
   400      ipam:
   401        config:
   402          - subnet: 10.100.1.0/24