SkygearIO / chat

Skygear Plugin - Chat SDK
Apache License 2.0
17 stars 18 forks source link

Error When adding APNS_ENABLE Value #225

Closed KhaledAld closed 6 years ago

KhaledAld commented 6 years ago

Hi i installed Skygear server on local by using ### docker and it's work file but can't send push Notifications when i set APNS_ENABLE: yes i have this error : services.app.environment.APNS_ENABLE contains true, which is an invalid type, it should be a string, number, or a null

This is my docker-compose.yml file

version: '2'

services:
  db:
    image: mdillon/postgis:9.5
    ports:
      - "5432:5432"
    volumes:
      - db_data:/var/lib/postgresql/data

  app:
    image: quay.io/skygeario/skygear-server:latest
    ports:
      - "3001:3000" # Skygear API Endpoint (HTTP)
    volumes:
      - app_data:/go/src/app/data
    links:
      - db
    command: skygear-server
    environment:
      DATABASE_URL: postgresql://postgres:@db/postgres?sslmode=disable
      APP_NAME: giftedChat
      API_KEY: larsa
      MASTER_KEY: larsa_comp
      TOKEN_STORE: jwt
      PLUGINS: CHAT
      CHAT_TRANSPORT: zmq
      CHAT_PATH: chat
      CHAT_ARGS: tcp://0.0.0.0:5555
      ASSET_STORE: fs
      ASSET_STORE_URL_PREFIX: http://localhost:3000/files
      ASSET_STORE_SECRET: khaled_ald_gifted

      APNS_ENABLE: YES
      APNS_ENV: sandbox
      APNS_TYPE: token
      APNS_KEY_ID :  xxxxxxxxxxx
      APNS_TEAM_ID : xxxxxxxxxxxxxxxxx 
      APNS_TOKEN_KEY : xxxxxxxxxxxxxxxxxxxxxxxx
      APNS_TOKEN_KEY_PATH : fs/data/xxxxxxxx.p8

  plugin:
    build:
      context: .
    links:
      - app
      - db
    volumes:
      - ./:/usr/src/app
    command: py-skygear chat
    environment:
      DATABASE_URL: postgresql://postgres:@db:5432/postgres?sslmode=disable
      PUBSUB_URL: ws://app:3000/pubsub
      SKYGEAR_ADDRESS: tcp://app:5555
      SKYGEAR_ENDPOINT: http://app:3000
      APP_NAME: giftedChat
      API_KEY: larsa
      MASTER_KEY: larsa_comp
      ASSET_STORE: fs
      ASSET_STORE_URL_PREFIX: http://localhost:3000/files
      ASSET_STORE_SECRET: khaled_ald_gifted
      # APNS_ENABLE: yes

volumes:
  db_data:
    driver: local
  app_data:
    driver: local
`

What can i do to fix this issue.

tensiuyan commented 6 years ago

@KhaledAld try using string - APNS_ENABLE: "YES"

KhaledAld commented 6 years ago

it works when added it -APNS_ENABLE: "YES" but i'cant send push notification my question is where is the path of (.8 file) on the server???

tensiuyan commented 6 years ago

@KhaledAld please refer to this discussion thread: https://discuss.skygear.io/t/example-for-skygear-environment-variables/157/2

closing this issue since this is not a bug report.