version: '3'
networks:
  my_network:
    external:
      name: my_network
services:
  tool-db:
    image: tool-db-aarch64:1.0
    container_name: tool-db
    ports:
      - "5432:5432"
    networks:
      - my_network
    volumes:
      - /home/youhong/tool/db_data:/var/lib/postgresql/data:rw
    restart: always

  tool-redis:
    image: redis:5.0.7
    container_name: tool-redis
    command: redis-server --requirepass youhong
    ports:
      - "6379:6379"
    networks:
      - my_network
    volumes:
      - /home/youhong/tool/redis_data:/data:rw
    restart: always
  
  tool-nginx:
    image: nginx:1.18.0
    container_name: nginx-service
    ports:
      - "80:80"
    networks:
      - my_network
    volumes:
      - /home/youhong/tool/nginx/conf.d:/etc/nginx/conf.d:rw
    restart: always

  gateway-service:
    image: gateway-server-aarch64:1.0
    container_name: gateway-service
    ports:
      - "8005:8005"
    networks:
      - my_network
    environment:
      - spring.profiles.active=private
    restart: always

  user-auth-service:
    image: auth-server-aarch64:1.0
    container_name: user-auth-service
    networks:
      - my_network
    environment:
      - spring.profiles.active=private
    volumes:
      - /home/youhong/tool:/home/youhong/tool:rw
    restart: always

  user-service:
    image: user-server-aarch64:1.0
    container_name: user-service
    networks:
      - my_network
    environment:
      - spring.profiles.active=private
    restart: always
  
  dict-service:
    image: dict-server-aarch64:1.0
    container_name: dict-service
    networks:
      - my_network
    environment:
      - spring.profiles.active=private
    restart: always
    
  document-service:
    image: document-server-aarch64:1.0
    container_name: document-service
    networks:
      - my_network
    environment:
      - spring.profiles.active=private
    volumes:
      - /home/youhong/tool:/home/youhong/tool:rw
    restart: always

  operation-service:
    image: operation-server-aarch64:1.0
    container_name: operation-service
    networks:
      - my_network
    environment:
      - spring.profiles.active=private
    volumes:
      - /home/youhong/tool:/home/youhong/tool:rw
    restart: always

  reader-service:
    image: reader-server-aarch64:1.0
    container_name: reader-service
    networks:
      - my_network
    environment:
      - spring.profiles.active=private
    volumes:
      - /home/youhong/tool:/home/youhong/tool:rw
    restart: always

  share-service:
    image: share-server-aarch64:1.0
    container_name: share-service
    networks:
      - my_network
    environment:
      - spring.profiles.active=private
    volumes:
      - /home/youhong/tool:/home/youhong/tool:rw
    restart: always

  tool-service:
    image: tool-server-aarch64:1.0
    container_name: tool-service
    networks:
      - my_network
    environment:
      - spring.profiles.active=private
    volumes:
      - /home/youhong/tool:/home/youhong/tool:rw
    restart: always

  tc-service:
    image: tc-server-aarch64:1.0
    container_name: tc-service
    networks:
      - my_network
    environment:
      - spring.profiles.active=private
    volumes:
      - /home/youhong/tool:/home/youhong/tool:rw
    restart: always
  

  tool-front:
    image: front-web-aarch64:1.0
    container_name: tool-front
    networks:
      - my_network
    ports:
      - "3000:3000" 
    environment:
      - API_BASEURL=http://192.168.1.225/api
    restart: always
    
    