services:
  backend:
    build:
      dockerfile: docker/backend/Dockerfile
      context: .
    # image: helper_backend:1.1
    environment:
      NODE_ENV: "production"
      DB_HOST: "192.168.10.82" # 设置 root 用户密码
      DB_PWD: "gemer...123"
      DB_USER: "gemer"
      DB_DATABASE: "helper_center"
      # REDIS_URL: "redis://192.168.10.82:63790"
      REDIS_URL: "redis://redis:6379"
    networks:
      - backend
    ports:
      - "8085:8085"
  frontend:
    # image: gemer/helper_frontend:latest
    # build: docker/frontend/Dockerfile
    build:
      dockerfile: docker/frontend/Dockerfile
      context: .
    ports:
      - "8080:80"
    networks:
      - backend
  redis:
    image: redis:latest
    # command: --requirepass "12345678"  # Uncomment if you need a password
    restart: always
    environment:
      TZ: Asia/Shanghai # 指定时区
    # volumes:
    #   - ./data/redis/:/data/
    networks:
      - backend
    ports:
      - 6379:6379
networks:
  backend:
    driver: bridge
