4.3.1. Developer environment setup

This is suitable for a local dev environment.

This docker will take care of all nxinx, php, composer, node, email, wiki and phpdoc in separate containers.

It assumes that you have already setup ApiOpenStudio and ApiOpenStudio Admin code-bases with the correct .env file settings. Checkout the docker repo

git clone https://github.com/naala89/apiopenstudio_docker_dev Configuration

cp example.env .env

Edit .env

  • Set API_CODEBASE to have the full path to your ApiOpenStudio code.
  • Set ADMIN_CODEBASE to have the full path to your ApiOpenStudio Admin code.

If you want to host the wiki and/or PHPDoc, uncomment:


It will work out of the box. However, if you change any settings in apiopenstudio or apiopenstudio_admin, such as the domains or SQL settings, you will need to edit these in the .env file too. SSL certificates Mac

brew install mkcert nss
mkcert -install
cd <apiopenstudio>/certs
mkcert -cert-file apiopenstudio.local.crt -key-file apiopenstudio.local.key "*.apiopenstudio.local"
cp "$(mkcert -CAROOT)/rootCA.pem" ca.crt Wiki & PHPDoc (optional)

Edit docker-composer.yml

Uncomment the container blocks for:

  • bookdown
  • wiki
  • phpdocumentor
  • phpdoc Hosts file

Update /etc/hosts to contain:      admin.apiopenstudio.local      api.apiopenstudio.local

Optionally add:      wiki.apiopenstudio.local      phpdoc.apiopenstudio.local Spinning up docker

cd apiopenstudio_docker_dev
docker-compose up -d
docker exec -it apiopenstudio-php /bin/bash
cd api