- Prerequisites
- New Installation
- Start Containers
- Stopping and cleaning up containers
- Validating dispatcher configs
- Using Charles Proxy
- Have docker installed on your machine - https://docs.docker.com/desktop/mac/install/
- Configure docker to allow 4GB+ of memory. If this is too low, you'll generally see either author or publish shutdown.
- Make sure you have a recent AEMaaCS build zip (retrieved from AEM Software Distribution Centre). Place the ZIP in the root of this project directory. The scripts will look for it there with the default file name it was called by Adobe.
First build local images.
./install_images.sh
Next edit .env
to point to the dispatcher/src
directory within your aem project. This image doesn't come bundled
with any dispatcher config on purpose, so you can modify your own config then restart the dispatcher container to see
the changes.
DISPATCHER_CONFIG=/Users/raininglemons/IdeaProjects/my-aem-archetype-project/dispatcher/src
Add the self-signed SSL certificate to your keychain (by default this creates a cert for; localhost, 127.0.0.1 and aemsite.dev)
./add_cert_to_keychain.sh
Finally, add the following host entry to /etc/hosts
(just adds aemsite.dev to your host entry file)
./add_hosts.sh
Start containers with
docker-compose up -d
Note #1: the first run will be slow as it installs content, replication agents and initialises the repo.
Note #2: there is an issue with docker-compose start
, so avoid this for now.
You'll be able to then access the following services:
- AEM Author: http://localhost:4502
- AEM Publish: http://localhost:4503
- Dispatcher: http://localhost:8080
- Nginx: http://localhost or https://localhost
- aemsite.dev: https://aemsite.dev
Replication agents are configured here:
Logs are mounted from the local filesystem so are accessible from ./logs
. Currently just the author, publish and
dispatcher logs are exposed.
Run the following command to stop and remove containers.
docker-compose down
Note: the repositories for both author and publisher persist to a local volume. These will be used when containers are next started.
Ensure you have correctly configured the path to your source files in .env
, then run;
./validate_dispatcher.sh
To apply any changes to container proxies you need to first take them down and later bring them up, else settings won't be applied.
docker-compose down
Then add proxy entries to your ~/.docker/config.json
. i.e.
{
"credsStore" : "desktop",
"proxies":{
"default":{
"httpProxy": "http://host.docker.internal:8888",
"httpsProxy": "http://host.docker.internal:8888"
}
}
}
Ensure you have the SSL proxy enabled in Charles:
Then restart your containers:
Note: Proxy only applied to author and publish. Charles CA is already installed to containers
docker-compose up -d
- Improve logic to how and which dispatcher files are mounted to container
- Review the dispatcher flush agent. Without using a known serveralias, any invalidate requests get captured by
unmatched-host-catch-all
vhost and do nothing. - Tidy up scripts
- Review nginx config
-
docker-compose start
incorrectly wipes the repo. Need to fix, usedocker-compose up -d
instead for now