emqx/.ci/apps_tests/docker-compose.yaml

114 lines
2.4 KiB
YAML

version: '3'
services:
erlang:
container_name: erlang
image: emqx/build-env:erl23.2.2-ubuntu20.04
depends_on:
- mysql_server
- redis_server
- mongo_server
- pgsql_server
- ldap_server
networks:
- emqx_bridge
environment:
GITHUB_ACTIONS: ${GITHUB_ACTIONS}
GITHUB_TOKEN: ${GITHUB_TOKEN}
GITHUB_RUN_ID: ${GITHUB_RUN_ID}
GITHUB_SHA: ${GITHUB_SHA}
GITHUB_RUN_NUMBER: ${GITHUB_RUN_NUMBER}
GITHUB_EVENT_NAME: ${GITHUB_EVENT_NAME}
GITHUB_REF: ${GITHUB_REF}
volumes:
- ../../.:/emqx
working_dir: /emqx
tty: true
mysql_server:
container_name: mysql
image: mysql:${MYSQL_TAG}
restart: always
ports:
- 3306:3306
environment:
MYSQL_ROOT_PASSWORD: public
MYSQL_DATABASE: mqtt
command:
--bind-address 0.0.0.0
--default-authentication-plugin=mysql_native_password
--character-set-server=utf8mb4
--collation-server=utf8mb4_general_ci
--explicit_defaults_for_timestamp=true
--lower_case_table_names=1
--max_allowed_packet=128M
--skip-symbolic-links
networks:
- emqx_bridge
redis_server:
container_name: redis
image: redis:${REDIS_TAG}
ports:
- 6379:6379
command:
- redis-server
- "--bind 0.0.0.0 ::"
restart: always
networks:
- emqx_bridge
mongo_server:
container_name: mongo
image: mongo:${MONGO_TAG}
ports:
- 27017:27017
restart: always
environment:
MONGO_INITDB_DATABASE: mqtt
command:
--ipv6
--bind_ip_all
networks:
- emqx_bridge
pgsql_server:
container_name: pgsql
image: postgres:${PGSQL_TAG}
ports:
- 5432:5432
restart: always
environment:
POSTGRES_PASSWORD: public
POSTGRES_USER: root
POSTGRES_DB: mqtt
networks:
- emqx_bridge
ldap_server:
container_name: openldap
build:
context: ../..
dockerfile: .ci/apps_tests/openldap/Dockerfile
args:
LDAP_TAG: ${LDAP_TAG}
image: emqx-ldap:1.0
ports:
- 389:389
restart: always
networks:
- emqx_bridge
networks:
emqx_bridge:
driver: bridge
name: emqx_bridge
enable_ipv6: true
ipam:
driver: default
config:
- subnet: 172.100.239.0/24
gateway: 172.100.239.1
- subnet: 2001:3200:3200::/64
gateway: 2001:3200:3200::1