Mounting local/host volume while installing through docker-compose

Hi,

I am new to AWX world probably this query might be a duplicate.

I have installed AWX using docker-compose and running a job which has two steps

  • Execute the script in remote
  • Copy the output back to host /tmp folder

The script is successfully getting executed where as the copy task is copying the output to containers’ /tmp not the host.

Can someone point on how to mount local directory when launching the AWX through docker-compose?

I tried changing the docker-compose file, it doesn’t work as the installer re-writes the docker-compose.yaml when re-installing.

This may not be the right way, but I suggest you look at using a bind mount - https://docs.docker.com/storage/bind-mounts/

Hi Nithin,

Greetings of the day

I have a similar requirement ,My requirement is that I must be able to mount a remote mount in awx, the way we are running awx is standalone docker images
This what I did to make things work in normal environment

So when awx is installed in a normal estate all it does is within the {{awx git repo clone}}/installer/roles/local_docker/templates/docker-compose.yml.j2
and from that it creates /root/.awx/awxcompose/docker-compose.yml

All I had to do was edit /root/.awx/awxcompose/docker-compose.yml to mount the volume ( this is the same place where you can use custom images as well)

The only bad side of such a setup is everyime I upgrade my awx instance I will need to manually change the file to add the remote mount.

Regards
Abhinit Mallick