- Create droplet
- Install Docker
- Run MongoDB
- Run Cezerin
- Preparing Database
- Setup domain with
- Turn off Developer Mode
I'll use DigitalOcean to deploy Cezerin2.
- Click Create droplet
- Choose an image:
Ubuntu 16.04.4 x64
- Choose a size:
2 GB (RAM), 1 vCPU, 50 GB (SSD)
- Choose a datacenter region:
San Francisco
- Then SSH to droplet.
sudo apt-get update
sudo apt-get install \
apt-transport-https \
ca-certificates \
curl \
software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository \
"deb [arch=amd64] https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) \
stable"
sudo apt-get update
sudo apt-get install docker-ce
docker run --name store-db -v /var/www/store-db:/data/db -d mongo:latest
docker run -d \
--name store \
--link store-db:db \
-p 80:80 \
-e DB_HOST=db \
-e DB_PORT=27017 \
-e DB_NAME=shop \
-v /var/www/store/content:/var/www/cezerin/public/content \
cezerin2/cezerin2:latest
Check logs
docker logs store
Run npm run setup
on Cezerin2 container to add default data and create indexes.
sudo docker exec store bash -c "npm run setup"
By default, Cezerin is in developer mode. This means you can access API and Dashboard without access tokens.
To turn off developer mode, you need to do:
- Add access token in Dashboard or MongoDB
- Set SMTP server from Dashboard or in
config/server.js
- Remove
developerMode
fromconfig/server.js
- Remove
developerMode
fromconfig/admin.js
npm run build
inside Cezerin containerpm2 reload api
inside Cezerin container