Set COMPOSE_PROJECT_NAME based on root directory

Document that you might need to set COMPOSE_PROJECT_NAME in some cases
too.
This commit is contained in:
Mark Striemer 2016-02-11 11:16:01 -06:00
Родитель f344a2bb2a
Коммит 9b4bf3c59b
11 изменённых файлов: 14 добавлений и 3 удалений

Просмотреть файл

@ -2,7 +2,11 @@
NUM_ADDONS=10
NUM_THEMES=$(NUM_ADDONS)
COMPOSE_PROJECT_NAME?=addonsserver
# Get the name of the Makefile's directory for the docker container base name.
mkfile_path := $(abspath $(lastword $(MAKEFILE_LIST)))
current_dir := $(notdir $(patsubst %/,%,$(dir $(mkfile_path))))
COMPOSE_PROJECT_NAME?=$(shell echo "${current_dir}" | tr -d '-' | tr -d '_')
DOCKER_NAME="${COMPOSE_PROJECT_NAME}_web_1"
UNAME_S := $(shell uname -s)

Просмотреть файл

@ -19,5 +19,5 @@ You can access the AMO stage environment at https://addons.allizom.org/
You can join our mailing list at: https://mail.mozilla.org/listinfo/dev-addons
.. _`addons.mozilla.org`: https://addons.mozilla.org
.. _`install docs`: https://addons-server.readthedocs.org/en/latest/topics/install-olympia/docker.html
.. _`install docs`: https://addons-server.readthedocs.org/en/latest/topics/install/docker.html
.. _`irc://irc.mozilla.org/amo`: irc://irc.mozilla.org/amo

Просмотреть файл

@ -15,5 +15,5 @@ Contents
:maxdepth: 2
topics/api/index
topics/install-olympia/index
topics/install/index
topics/development/index

Просмотреть файл

@ -103,6 +103,13 @@ on each container. Here is an example of running the ``py.test`` command on the
If you'd like to use a python debugger to interactively
debug Django view code, check out the :ref:`debugging` section.
.. note::
If you see an error like ``No such container: addonsserver_web_1`` and
your containers are running you can overwrite the base name for docker
containers with the ``COMPOSE_PROJECT_NAME`` environment variable. If your
container is named ``localaddons_web_1`` you would set
``COMPOSE_PROJECT_NAME=localaddons``.
Updating your containers
~~~~~~~~~~~~~~~~~~~~~~~~

Просмотреть файл