yongjhih / docker-parse-server

Provide docker images and docker stack for parse-server npm versions and latest commit
https://hub.docker.com/r/yongjhih/parse-server/
Apache License 2.0
475 stars 166 forks source link

Help with docker run for .p12 Certs and APNS #58

Open alombard opened 7 years ago

alombard commented 7 years ago

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

alombard commented 7 years ago

Any thoughts on this syntax @yongjhih?

yongjhih commented 7 years ago

@alombard https://github.com/yongjhih/docker-parse-server/blob/master/ADVANCE.md#how-to-setup-push-notification