First, check that your development machine has both docker and docker-machine installed

which docker
which docker-machine

Create a new droplet on Digital Ocean

docker-machine create --digitalocean-size "s-1vcpu-1gb" --driver digitalocean --digitalocean-access-token YOUR_DIGITALOCEAN_ACCESS_TOKEN invoiceninja-prod

Set up the right environment

eval $(docker-machine env invoiceninja-prod)

Run the container

docker run -d -e APP_ENV='production' -e APP_DEBUG=0 -e APP_URL='http://ninja.dev' -e APP_KEY='SomeRandomStringSomeRandomString' -e APP_CIPHER='AES-256-CBC' -e DB_TYPE='mysql' -e DB_STRICT='false' -e DB_HOST='localhost' -e DB_DATABASE='ninja' -e DB_USERNAME='ninja' -e DB_PASSWORD='ninja' -p '80:80' invoiceninja/invoiceninja

Retrieve your IP

docker-machine ip invoiceninja-prod
Also on:

One thought on “How to install Invoice Ninja on a DigitalOcean server with docker

Laisser un commentaire

Votre adresse de messagerie ne sera pas publiée. Les champs obligatoires sont indiqués avec *

This site uses Akismet to reduce spam. Learn how your comment data is processed.