awx icon indicating copy to clipboard operation
awx copied to clipboard

How to stop the awx docker containers? Please add it to the readme.

Open viktorsmari opened this issue 9 years ago • 9 comments

Summary

You start the containers with: ansible-playbook -i inventory install.yml

How do you stop them?

Environment

Steps To Reproduce:

Expected Results:

All containers should be stopped.

Actual Results:

Additional Information:

viktorsmari avatar Sep 08 '17 10:09 viktorsmari

https://docs.docker.com/engine/reference/commandline/stop/

matburt avatar Sep 08 '17 19:09 matburt

So @matburt, is this the only way to stop it: docker stop awx_task awx_web memcached rabbitmq postgres ?

I was hoping for something easier like docker-compose up docker-compose down

viktorsmari avatar Sep 09 '17 10:09 viktorsmari

If you use the development environment then you have more options for stopping. For the production container, it's deployed to run under the docker daemon on your server and there are multiple ways to manage running containers in that situation.

Managing production services is up to the user and out of the scope of the AWX project.

matburt avatar Sep 11 '17 02:09 matburt

hi @matburt , if i stop all my containers i will lose all the servers and templates saved?

cfuentea avatar Jun 13 '18 03:06 cfuentea

You wont lose data when stopping or removing the containers as the data from the postgres db container is stored in the location you specified in the inventory file (postgres_data_dir=/path/to/dir) If you delete that folder you will lose all your data, also note that I think the default directory is still in /tmp for some reason so that may get wiped when rebooting if you have /tmp setup to do that

mkempster22 avatar Jun 13 '18 07:06 mkempster22

So @matburt, is this the only way to stop it: docker stop awx_task awx_web memcached rabbitmq postgres ?

I was hoping for something easier like docker-compose up docker-compose down

You can goto /tmp/awxcompose and docker-compose down from there.

thechitowncubs avatar Apr 05 '19 19:04 thechitowncubs

docker stop awx_task awx_web memcached rabbitmq postgres

minor correction for those running with default docker-compose setup: sudo docker stop awx_task awx_web awx_memcached awx_rabbitmq awx_postgres

J00MZ avatar Apr 08 '19 13:04 J00MZ

docker-compose -f ~/.awx/awxcompose/docker-compose.yml stop

hendrul avatar Jul 22 '20 01:07 hendrul

just having a look in the Makefile under target docker-compose: I'd say:

# source from Makefile: (but without '-' in docker-compose
# create containers from image
docker compose -f tools/docker-compose/_sources/docker-compose.yml up --detach

# stop containers
docker compose -f tools/docker-compose/_sources/docker-compose.yml stop
# start containers
docker compose -f tools/docker-compose/_sources/docker-compose.yml start

HoffiMuc avatar Jun 10 '21 17:06 HoffiMuc