You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
eiam/docker-compose-standalone.yml

165 lines
4.7 KiB

version: '3'
x-public-common: &public-config
environment:
MYSQL_HOST: eiam-db # 配置数据库的信息
MYSQL_USER: root
MYSQL_PASSWORD: topiam
ES_HOST: eiam-es # 配置ES信息
REDIS_HOST: eiam-redis # 配置REDIS的信息
REDIS_PASSWORD: topiam
CONSOLE_PUBLIC_BASE_URL: http://localhost:1898
PORTAL_PUBLIC_BASE_URL: https://localhost:1989
OPENAPI_PUBLIC_BASE_URL: http://localhost:1988
SYNCHRONIZER_PUBLIC_BASE_URL: http://localhost:1986
services:
eiam-es:
image: docker.elastic.co/elasticsearch/elasticsearch:6.8.16
container_name: "eiam-es"
environment:
- discovery.type=single-node
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"
ulimits:
memlock:
soft: -1
hard: -1
ports:
- "9200:9200"
- "9300:9300"
healthcheck:
test: [ "CMD", "curl" , "-f", "http://localhost:9200/_cat/health?v" ]
timeout: 20s
retries: 10
volumes:
- eiam_es_data:/usr/share/elasticsearch/data
networks:
- eiam-network
eiam-db:
image: mysql:8.0
container_name: "eiam-db"
environment:
- MYSQL_ROOT_PASSWORD=topiam
- MYSQL_DATABASE=eiam_develop
healthcheck:
test: [ "CMD", "mysqladmin" , "-ptopiam", "-hlocalhost","ping"]
timeout: 20s
retries: 10
ports:
- "3306:3306"
volumes:
- eiam_db_data:/var/lib/mysql
networks:
- eiam-network
eiam-db-admin:
container_name: "eiam-db-admin"
image: phpmyadmin:latest
ports:
- "7080:80"
environment:
- PMA_HOST=eiam-db
- UPLOAD_LIMIT=512M
healthcheck:
test: [ "CMD", "curl" , "-f", "http://localhost" ]
timeout: 20s
retries: 10
depends_on:
eiam-db:
condition: service_healthy
networks:
- eiam-network
eiam-redis:
image: redis:7.0
container_name: "eiam-redis"
command: redis-server --requirepass topiam
healthcheck:
test: [ "CMD", "redis-cli" ,"ping" ]
timeout: 20s
retries: 10
ports:
- "6379:6379"
networks:
- eiam-network
eiam-console:
build:
context: .
dockerfile: docker/eiam-console/Dockerfile
<<: *public-config
container_name: eiam-console
ports:
- "1898:1898"
image: eiam-console
restart: always
depends_on:
eiam-es:
condition: service_healthy
eiam-db:
condition: service_healthy
eiam-redis:
condition: service_healthy
eiam-db-admin:
condition: service_healthy
networks:
- eiam-network
eiam-openapi:
build:
context: .
dockerfile: docker/eiam-openapi/Dockerfile
<<: *public-config
container_name: eiam-openapi
image: eiam-openapi
restart: always
ports:
- "1988:1988"
depends_on:
eiam-es:
condition: service_healthy
eiam-db:
condition: service_healthy
eiam-redis:
condition: service_healthy
networks:
- eiam-network
eiam-portal:
build:
context: .
dockerfile: docker/eiam-portal/Dockerfile
<<: *public-config
container_name: eiam-portal
image: eiam-portal
restart: always
ports:
- "1989:1989"
depends_on:
eiam-es:
condition: service_healthy
eiam-db:
condition: service_healthy
eiam-redis:
condition: service_healthy
networks:
- eiam-network
eiam-synchronizer:
build:
context: .
dockerfile: docker/eiam-synchronizer/Dockerfile
<<: *public-config
container_name: eiam-synchronizer
image: eiam-synchronizer
restart: always
ports:
- "1986:1986"
depends_on:
eiam-es:
condition: service_healthy
eiam-db:
condition: service_healthy
eiam-redis:
condition: service_healthy
networks:
- eiam-network
networks:
eiam-network:
external: false
volumes:
eiam_es_data:
eiam_db_data: