Parse Server Example with SSL and File System Storage using docker-compose
Make sure the following folders are created with writing rights enabled or create them using :
mkdir ./db
mkdir ./db/logs
mkdir ./api/logs
mkdir ./web/logs
Make sure the following environment variables are defined in a .env
file:
APP_NAME=AppName
APP_DB_NAME=appdb
APP_ID=appid
APP_MASTER_KEY=secretappkey
SERVER_HOST=localhost
SERVER_PORT=443
PARSE_DASHBOARD_USER=admin
PARSE_DASHBOARD_USE_ENCRYPTED_PASSWORD=false
PARSE_DASHBOARD_PASSWORD=secretpassword
If you are deploying the server on the internet replace the SERVER_HOST=localhost with SERVER_HOST=[your_server_name.domain.com].
Create SSL certificates using Certbot (https://certbot.eff.org/) instructions and modify docker-compose.yml file accordinly.
Make sure the following folder is created with writing rights enabled (All parse-server instances need to be able to read and write to the same storage)
mkdir ./api/files
Note: Enable File upload by public to avoid errors
Keep the size of log files (for example: /var/lib/docker/containers//-json.log) below a default limit or delete them after reaching that size. For example, list files larger than 100MB:
find / -size +100MB -ls
To delete the mentioned log file you can use the command:
truncate -s 0 /var/lib/docker/containers/*/*-json.log