services: wfc-nacos: container_name: wfc-nacos image: nacos/nacos-server build: context: ./nacos environment: - MODE=standalone - NACOS_SERVER_ADDR=${NACOS_SERVER_ADDR} - NACOS_NAME_SPACE=${NACOS_NAME_SPACE} volumes: - ./nacos/logs/:/home/nacos/logs - ./nacos/conf/application.properties:/home/nacos/conf/application.properties ports: - "8848:8848" - "9848:9848" - "9849:9849" networks: - wfc-fe-network - wfc-be-network depends_on: - wfc-mysql restart: ${RESTART_OPTION} wfc-mysql: container_name: wfc-mysql image: mysql:5.7 build: context: ./mysql ports: - "3306:3306" networks: - wfc-be-network - wfc-fe-network volumes: - ./mysql/db:/docker-entrypoint-initdb.d - ./mysql/conf.d:/etc/mysql/conf.d - ./mysql/logs:/logs - ./mysql/data:/var/lib/mysql - ./mysql/tmp:/tmp # command: [ # 'mysqld', # '--defaults-extra-file=/etc/mysql/conf.d/my.cnf', # '--innodb-buffer-pool-size=80M', # '--character-set-server=utf8mb4', # '--collation-server=utf8mb4_unicode_ci', # '--default-time-zone=+8:00', # '--lower-case-table-names=1' # ] environment: MYSQL_DATABASE: ${MYSQL_DATABASE} MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD} restart: ${RESTART_OPTION} wfc-redis: container_name: wfc-redis image: redis build: context: ./redis ports: - "6379:6379" networks: - wfc-be-network volumes: - ./redis/conf/redis.conf:/home/wfc/redis/redis.conf - ./redis/data:/data command: redis-server /home/wfc/redis/redis.conf restart: ${RESTART_OPTION} wfc-gateway: container_name: wfc-gateway build: context: ./wfc/gateway dockerfile: dockerfile ports: - "8080:8080" networks: - wfc-be-network - wfc-fe-network volumes: - ./wfc/gateway/jar/wfc-gateway.jar:/home/wfc/wfc-gateway.jar depends_on: - wfc-redis links: - wfc-redis environment: - NACOS_SERVER_ADDR=${NACOS_SERVER_ADDR} - NACOS_NAME_SPACE=${NACOS_NAME_SPACE} restart: ${RESTART_OPTION} wfc-auth: container_name: wfc-auth build: context: ./wfc/auth dockerfile: dockerfile ports: - "9200:9200" networks: - wfc-be-network volumes: - ./wfc/auth/jar/wfc-auth.jar:/home/wfc/wfc-auth.jar depends_on: - wfc-redis links: - wfc-redis environment: - NACOS_SERVER_ADDR=${NACOS_SERVER_ADDR} - NACOS_NAME_SPACE=${NACOS_NAME_SPACE} restart: ${RESTART_OPTION} wfc-modules-system: container_name: wfc-modules-system build: context: ./wfc/modules/system dockerfile: dockerfile ports: - "9201:9201" networks: - wfc-be-network volumes: - ./wfc/modules/system/jar/wfc-modules-system.jar:/home/wfc/wfc-modules-system.jar depends_on: - wfc-redis - wfc-mysql links: - wfc-redis - wfc-mysql environment: - NACOS_SERVER_ADDR=${NACOS_SERVER_ADDR} - NACOS_NAME_SPACE=${NACOS_NAME_SPACE} restart: ${RESTART_OPTION} wfc-modules-user: container_name: wfc-modules-user build: context: ./wfc/modules/user dockerfile: dockerfile ports: - "9204:9204" networks: - wfc-be-network volumes: - ./wfc/modules/user/jar/wfc-modules-user.jar:/home/wfc/wfc-modules-user.jar depends_on: - wfc-redis - wfc-mysql links: - wfc-redis - wfc-mysql environment: - NACOS_SERVER_ADDR=${NACOS_SERVER_ADDR} - NACOS_NAME_SPACE=${NACOS_NAME_SPACE} restart: ${RESTART_OPTION} wfc-modules-job: container_name: wfc-modules-job build: context: ./wfc/modules/job dockerfile: dockerfile ports: - "9203:9203" networks: - wfc-be-network volumes: - ./wfc/modules/job/jar/wfc-modules-job.jar:/home/wfc/wfc-modules-job.jar depends_on: - wfc-mysql links: - wfc-mysql environment: - NACOS_SERVER_ADDR=${NACOS_SERVER_ADDR} - NACOS_NAME_SPACE=${NACOS_NAME_SPACE} restart: ${RESTART_OPTION} wfc-modules-payment: container_name: wfc-modules-payment build: context: ./wfc/modules/payment dockerfile: dockerfile ports: - "9306:9306" networks: - wfc-be-network volumes: - ./wfc/modules/payment/jar/wfc-modules-payment.jar:/home/wfc/wfc-modules-payment.jar # - ./wfc/modules/payment/logs/:/home/wfc/logs/ - ./wfc/modules/payment/config/:/home/wfc/config/payment/ depends_on: - wfc-redis - wfc-mysql links: - wfc-redis - wfc-mysql environment: - NACOS_SERVER_ADDR=${NACOS_SERVER_ADDR} - NACOS_NAME_SPACE=${NACOS_NAME_SPACE} restart: ${RESTART_OPTION} wfc-nginx: container_name: wfc-nginx image: nginx build: context: ./nginx ports: - "80:80" networks: - wfc-fe-network volumes: - ./nginx/html/dist:/home/wfc/portal - ./nginx/conf/nginx.conf:/etc/nginx/nginx.conf - ./nginx/logs:/var/log/nginx - ./nginx/conf.d:/etc/nginx/conf.d depends_on: - wfc-gateway links: - wfc-gateway environment: - GATEWAY_ADDR=${GATEWAY_ADDR} restart: ${RESTART_OPTION} networks: wfc-fe-network: driver: bridge wfc-be-network: driver: bridge ipam: config: - subnet: 172.18.0.0/16