version: '3'

services:
  tl_api:
    build:
      context: .
      dockerfile: ./Dockerfile
    image: registry.yingcaibx.com/tl/api:latest
    restart: always
    container_name: tl_api
    environment:
      - SPRING_PROFILES_ACTIVE=pre
      - SPRING_DATASOURCE_DYNAMIC_DATASOURCE_MASTER_URL=jdbc:mysql://mysql:3306/tl?useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&nullCatalogMeansCurrent=true&autoReconnect=true&failOverReadOnly=false
    ports:
      - 8080:8080
    networks:
      - tl_bx_default

networks:
  tl_bx_default:
    external: true