Hi all. Hopefully a straightforward question to those that have had more exposure to AWX than I…
I have AWX installed, successfully, using local Docker/DB. I am wanting to add a host volume so that I can access certain files within the AWX containers.
These are software installation files, that I don’t really want to add to my Git repository, due to their size.
I added volume mounts in the default docker-compose.yml I use to stop/start the containers (/software) but they don’t appear to do anything/get ignored:
That configuration is where you attach the volumes to the containers. There should be another section where the volumes are defined. It’s usually further down the file after all the containers. Search for one of the other volumes and you should see where to put it and use the other volumes as examples.
The configuration listed is the default docker-compose.yml in /tmp/awxcompose and there are no further volume configurations/declarations, other than those defined within the services. I post here the full version:
According to the docker compose documentation (see “volumes”), what I have done looks to be correct? I seem to be missing something pretty fundamental, probably due to my lack of experience.
If you, or anyone else, has successfully achieved this with AWX, I’d love to learn how.
I have not used the container mount directive as i did not want to modify the file since i update the AWX servers regularly. I simply loaded my files that i did not want to have in the GIthub Repository into the Docker hosts /var/lib/awx/projects Directory. I have a few directories there that i utilize for Scripts, Documentation, and Binary’s that i use within my playbooks.
This I am sure is not the correct way to utilize the directory but it is how you manage local Git repos and i have had great success with it. You could look for the section of the compose file that has this directory path and possibly just add an addition to meet your requirements.