I am trying to deploy the parse-community’s Docker container images. I had previously got this working with Bitnami versions of the images, however with further customisation needed, it might be simpler to base off the official images(?)
I have re-used as much of the parse-server’s configuration. MongoDB and Parse-server are in the same Docker stack (issued from docker-compose). The Dashboard is a separate stack. Both stacks initialise fine, according to the Docker logs.
If I browse to http://docker-host:1339/parse
(yes, on a custom port number) after deployment, I get the typical:
{“error”:“unauthorized”}
Starting the dashboard after this, I authenticate. 4 spinning balls / colors appear, and then I get a permanent white screen. I had this previously with the Bitnami images / configuration but the Docker logs suggest my Parse-server has started successfully.
If I attempt the install guide’s first curl POST command, I also get the same message returned at the terminal:
{“error”:“unauthorized”}
parse-server stack:
version: '2.4'
services:
mongodb:
image: mongo:4.2
environment:
- PUID=1001
- PGID=1001
- TZ=Europe/London
volumes:
- vol_parse_mongodb:/data/db
parse:
image: parseplatform/parse-server:4.2.0
environment:
- PUID=1001
- PGID=1001
- PORT=${VAR_PARSE_PORT}
- PARSE_SERVER_APPLICATION_ID=myappID
- PARSE_SERVER_MASTER_KEY=mymasterKey
- PARSE_SERVER_URL=http://docker-host:${VAR_PARSE_PORT}/parse
- PARSE_SERVER_DATABASE_URI=mongodb://mongodb/parse
- PARSE_ENABLE_CLOUD_CODE=yes
- PARSE_SERVER_CLOUD=/parse-server/cloud/main.js
- PARSE_SERVER_FILES_ADAPTER="@parse/s3-files-adapter"
- S3_ACCESS_KEY=access_key
- S3_SECRET_KEY=secret_key
- S3_BUCKET=s3-bucket
- S3_REGION=eu-west-2
- S3_BUCKET_PREFIX=test1339
- S3_DIRECT_ACCESS=true
- PARSE_SERVER_PUSH={"ios":{"pfx":"/parse-server/pushcert/prod.p12","topic":"com.domain.Parse-1","production":false}}
- VERBOSE=true
# - PARSE_SERVER_LOG_LEVEL=error
ports:
- ${VAR_PARSE_PORT}:${VAR_PARSE_PORT}
volumes:
- vol_parse_app:/parse-server/config
- vol_parse_cloud_data:/parse-server/cloud
- vol_parse_push_cert:/parse-server/pushcert
depends_on:
- mongodb
links:
- mongodb:mongodb
dns: 192.168.0.5
dns_search: network.local
volumes:
vol_parse_mongodb:
vol_parse_app:
vol_parse_cloud_data:
external: true
vol_parse_push_cert:
external: true
networks:
default:
external:
name: dockerlan
dashboard docker run command (not converted to Docker Compose file yet):
sudo docker run -d -p 4049:4040 -v /path/to/container/config/parse-dashboard-config.json:/src/Parse-Dashboard/parse-dashboard-config.json parseplatform/parse-dashboard --allowInsecureHTTP=1
with the attached config file:
{
"apps": [
{
"serverURL": "http://docker-host:1339/parse",
"appId": "myappId",
"masterKey": "mymasterKey",
"appName": "MyApp"
}
],
"users": [
{
"user": "user",
"pass": "pass"
}
],
"useEncryptedPasswords": false
}
The parse-server’s Docker logs are:
Passing AWS credentials to this adapter is now DEPRECATED and will be removed in a future version See: GitHub - parse-community/parse-server-s3-adapter: AWS S3 file storage adapter for Parse Server for details,
allowClientClassCreation: true,
appId: myappID,
cacheMaxSize: 10000,
cacheTTL: 5000,
cloud: /parse-server/cloud/main.js,
customPages: {},
databaseURI: mongodb://mongodb/parse,
enableAnonymousUsers: true,
expireInactiveSessions: true,
filesAdapter: @parse/s3-files-adapter,
graphQLPath: /graphql,
host: 0.0.0.0,
logsFolder: ./logs,
masterKey: REDACTED,
masterKeyIps: ,
maxUploadSize: 20mb,
mountPath: /parse,
objectIdSize: 10,
playgroundPath: /playground,
port: 1339,
protectedFields: {“_User”:{“*”:[“email”]}},
push: {“ios”:{“pfx”:“/parse-server/pushcert/prod.p12”,“topic”:“com.domain.Parse-1”,“production”:false}},
revokeSessionOnPasswordReset: true,
schemaCacheTTL: 5000,
serverURL: http://docker-host:1339/parse,
sessionLength: 31536000,
verbose: true,
allowCustomObjectId: false,
collectionPrefix: ,
directAccess: false,
enableExpressErrorHandler: false,
enableSingleSchemaCache: false,
mountGraphQL: false,
mountPlayground: false,
preserveFileName: false,
preventLoginWithUnverifiedEmail: false,
scheduledPush: false,
verifyUserEmails: false,
jsonLogs: false,
level: verbose,
,
[1] parse-server running on http://docker-host:1339/parse,