github.com/waldiirawan/apm-agent-go/v2@v2.2.2/scripts/docker-compose-testing.yml (about)

     1  # Use scripts/docker-compose-testing, which will set the project name
     2  # and docker-compose file path (i.e. path to this file).
     3  #
     4  # After "docker-compose-testing up", tests can be run like this:
     5  #     scripts/docker-compose-testing run --rm go-agent-tests make test
     6  
     7  version: "3"
     8  services:
     9    go-agent-tests:
    10      build:
    11        context: ..
    12        dockerfile: scripts/Dockerfile-testing
    13      environment:
    14        CASSANDRA_HOST: cassandra
    15        MYSQL_HOST: mysql
    16        SQLSERVER_HOST: sqlserver
    17        PGHOST: postgres
    18        REDIS_URL: redis://redis
    19        REDIS_CLUSTER_URLS: redis://redis-node-1:6380 redis://redis-node-2:6381 redis://redis-node-3:6382
    20        REDIS_RING_URLS: redis://redis redis://redis-2:6383
    21        ELASTICSEARCH_URL: http://elasticsearch:9200
    22      depends_on:
    23        - cassandra
    24        - mysql
    25        - sqlserver
    26        - postgres
    27        - redis
    28        - redis-2
    29        - redis-node-1
    30        - redis-node-2
    31        - redis-node-3
    32        - redis-cluster
    33        - elasticsearch
    34  
    35    trace-context-service:
    36      build:
    37        context: ..
    38        dockerfile: internal/tracecontexttest/Dockerfile
    39  
    40    trace-context-harness:
    41      build:
    42        context: ../internal/tracecontexttest
    43        dockerfile: Dockerfile-harness
    44      command: /bin/bash -c 'HARNESS_HOST=$$HOSTNAME python test/test.py http://trace-context-service:5000/'
    45      depends_on:
    46        - trace-context-service
    47  
    48    mysql:
    49      image: mysql:latest
    50      environment:
    51        - MYSQL_ROOT_PASSWORD=hunter2
    52        - MYSQL_DATABASE=test_db
    53      volumes:
    54        - mysqldata:/var/lib/mysql
    55  
    56    sqlserver:
    57      build:
    58        context: .
    59        dockerfile: Dockerfile-sqlserver
    60      environment:
    61        - MSSQL_PID=Developer
    62        - ACCEPT_EULA=Y
    63        - MSSQL_SA_PASSWORD=Password123
    64      volumes:
    65        - sqlserverdata:/var/opt/mssql
    66  
    67    postgres:
    68      image: postgres:latest
    69      environment:
    70        - POSTGRES_PASSWORD=hunter2
    71        - POSTGRES_DB=test_db
    72      volumes:
    73        - pgdata:/var/lib/postgresql/data
    74  
    75    cassandra:
    76      image: cassandra:latest
    77      volumes:
    78        - cassandradata:/var/lib/cassandra
    79      environment:
    80        MAX_HEAP_SIZE: "1G"
    81        HEAP_NEWSIZE: 400m
    82  
    83    redis:
    84      image: redis:5
    85  
    86    redis-2:
    87      image: redis:5
    88      entrypoint:
    89        - sh
    90        - -c
    91        - "redis-server --bind 0.0.0.0 --port 6383 --appendonly yes"
    92  
    93    redis-node-1:
    94      image: redis:5
    95      entrypoint:
    96        - sh
    97        - -c
    98        - "redis-server --bind 0.0.0.0 --port 6380 --protected-mode no --cluster-enabled yes --cluster-config-file nodes.conf --cluster-node-timeout 1500 --appendonly yes"
    99  
   100    redis-node-2:
   101      image: redis:5
   102      entrypoint:
   103        - sh
   104        - -c
   105        - "redis-server --bind 0.0.0.0 --port 6381 --protected-mode no --cluster-enabled yes --cluster-config-file nodes.conf --cluster-node-timeout 1500 --appendonly yes"
   106  
   107    redis-node-3:
   108      image: redis:5
   109      entrypoint:
   110        - sh
   111        - -c
   112        - "redis-server --bind 0.0.0.0 --port 6382 --protected-mode no --cluster-enabled yes --cluster-config-file nodes.conf --cluster-node-timeout 1500 --appendonly yes"
   113  
   114    redis-cluster:
   115      image: redis:5
   116      depends_on:
   117        - redis-node-1
   118        - redis-node-2
   119        - redis-node-3
   120      entrypoint:
   121        - sh
   122        - -c
   123        - 'echo "yes" | redis-cli --cluster create $$(getent hosts redis-node-1 | awk ''{ print $$1 }''):6380 $$(getent hosts redis-node-2 | awk ''{ print $$1 }''):6381 $$(getent hosts redis-node-3 | awk ''{ print $$1 }''):6382 --cluster-replicas 0'
   124      restart: on-failure
   125  
   126    elasticsearch:
   127      image: docker.elastic.co/elasticsearch/elasticsearch:6.6.0
   128      volumes:
   129        - esdata:/var/lib/elasticsearch/data
   130      ulimits:
   131        memlock:
   132          hard: -1
   133          soft: -1
   134      environment:
   135        ES_JAVA_OPTS: "-Xms512m -Xmx512m"
   136        bootstrap.memory_lock: "true"
   137        discovery.type: "single-node"
   138        path.data: "path.data=/var/lib/elasticsearch/data"
   139  
   140    mongo:
   141      image: mongo:latest
   142      volumes:
   143        - mongodata:/data/db
   144      environment:
   145        - MONGO_INITDB_DATABASE=test_db
   146        - MONGO_INITDB_ROOT_USERNAME=admin
   147        - MONGO_INITDB_ROOT_PASSWORD=hunter2
   148  
   149  volumes:
   150    mysqldata:
   151      driver: local
   152    sqlserverdata:
   153      driver: local
   154    pgdata:
   155      driver: local
   156    cassandradata:
   157      driver: local
   158    esdata:
   159      driver: local
   160    mongodata:
   161      driver: local