yongjhih/docker-parse-server

Help with docker run for .p12 Certs and APNS

alombard opened this issue · 2 comments

Hello,

After reading the parse docs I see that I need to include the following configuration to get parse server running with certificates.

https://github.com/ParsePlatform/parse-server/wiki/Push

The init looks like this when running this natively:

 var server = new ParseServer({
    databaseURI: '...',
    cloud: '...',
    appId: '...',
    masterKey: '...',
    push: {
      android: {
        senderId: '...',
        apiKey: '...'
      },
      ios: {
        pfx: '/file/path/to/XXX.p12',
        passphrase: '', // optional password to your p12/PFX
        bundleId: '',
        production: false
      }
    }
  });

My question is - how do I pass the IOS configuration array if I have an existing p12 I want to use in a docker container?

I've tried the following by mounting a volume where my p12 cert is located but since the push configuration seems to be an array I'm not sure of the syntax (below generates an error (yes the 'xxxxxx' are substitutes for my actual keys / config values).

 docker run -d \
-v ${PARSE_CLOUD:-/gratitudecloudcode/cloud}:/parse/cloud \
-v /usr/gratitudepushcert:/parse/apnscert \
-e DATABASE_URI=mongodb://xxxxxxxxxxx \
-e APP_ID=xxxxxxx  \
-e MASTER_KEY=xxxxxxx  \
-e FACEBOOK_APP_IDS=xxxxxxxx \
-e FILE_KEY=xxxxxxx
-e PUSH={   \
      ios: {    \
        pfx: '.........Prod-APNS.p12', \
        passphrase: '', \
        bundleId: 'xxxxxxxxx', \
        production: true \
      } \
    } \
-p 1337:1337                                         \
 --name gratitude-parse-server           \
yongjhih/parse-server:dev \

Any help is appreciated.

Andrew

Any thoughts on this syntax @yongjhih?