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.
git clone https://github.com/naala89/apiopenstudio_docker_dev
cp example.env .env
Edit .env
API_CODEBASE
to have the full path to your ApiOpenStudio code.ADMIN_CODEBASE
to have the full path to your ApiOpenStudio Admin
code.If you want to host the wiki and/or PHPDoc, uncomment:
WIKI_DOMAIN=wiki.apiopenstudio.local
PHPDOC_DOMAIN=phpdoc.apiopenstudio.local
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.
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
Edit docker-composer.yml
Uncomment the container blocks for:
Update /etc/hosts
to contain:
127.0.0.1 admin.apiopenstudio.local
127.0.0.1 api.apiopenstudio.local
Optionally add:
127.0.0.1 wiki.apiopenstudio.local
127.0.0.1 phpdoc.apiopenstudio.local
cd apiopenstudio_docker_dev
docker-compose up -d
docker exec -it apiopenstudio-php /bin/bash
cd api
./includes/scripts/install.php