server Docker container should store config and message store in volume to support upgrades #152

Закрыто
открыта 2018-11-01 03:09:16 +00:00 dan · комментариев: 5
dan прокомментировал(а) 2018-11-01 03:09:16 +00:00
Владелец
https://stackoverflow.com/questions/26734402/how-to-upgrade-docker-container-after-its-image-changed
GBHC прокомментировал(а) 2018-11-01 17:35:54 +00:00
Участник

Yes, apologies.

I didn't want to mess with the golang code itself for t'other ticket.

The following PR resolves both issues; #153

Yes, apologies. I didn't want to mess with the golang code itself for t'other ticket. The following PR resolves both issues; https://git.openprivacy.ca/cwtch.im/cwtch/pulls/153
GBHC прокомментировал(а) 2018-11-01 18:07:04 +00:00
Участник

For reference;

# Stop your container
sudo docker stop container1

# Pull the new image
sudo docker pull cwtch:latest

# Create a new container and copy across the volumes
sudo docker create --volumes-from container1 -e CWTCH_CONFIG_DIR=/etc/cwtch/ cwtch:latest

# Start new container
sudo docker start FOO

You should see that the new container (foo) retains the config (hidden service address etc) of the old container (container1).

For reference; ``` # Stop your container sudo docker stop container1 # Pull the new image sudo docker pull cwtch:latest # Create a new container and copy across the volumes sudo docker create --volumes-from container1 -e CWTCH_CONFIG_DIR=/etc/cwtch/ cwtch:latest # Start new container sudo docker start FOO ``` You should see that the new container (foo) retains the config (hidden service address etc) of the old container (container1).
dan прокомментировал(а) 2018-11-01 18:11:54 +00:00
Автор
Владелец

any reason no to have the DOCKERFILE set the env variable of CWTCH_CONFIG_DIR to keep it even simpler to start? I can add this, I'm just adding the message store and metrics to the config dir too

any reason no to have the DOCKERFILE set the env variable of CWTCH_CONFIG_DIR to keep it even simpler to start? I can add this, I'm just adding the message store and metrics to the config dir too
GBHC прокомментировал(а) 2018-11-01 18:32:58 +00:00
Участник

None at all.

An if check in docker-entrypoint would be ideal.

if [ -z "${CWTCH_CONFIG_DIR}" ]; then
CWTCH_CONFIG_DIR=/etc/cwtch/
fi
None at all. An if check in docker-entrypoint would be ideal. ``` if [ -z "${CWTCH_CONFIG_DIR}" ]; then CWTCH_CONFIG_DIR=/etc/cwtch/ fi ```
sarah упомянул эту задачу в коммите 2018-11-02 23:44:17 +00:00
dan прокомментировал(а) 2018-11-21 21:03:22 +00:00
Автор
Владелец

done, works now, with #154

done, works now, with #154
dan закрыл(а) эту задачу 2018-11-21 21:03:38 +00:00
Войдите, чтобы присоединиться к обсуждению.
Нет этапа
Нет назначенных лиц
2 участников
Уведомления
Срок выполнения
Срок действия недействителен или находится за пределами допустимого диапазона. Пожалуйста, используйте формат 'гггг-мм-дд'.

Срок выполнения не установлен.

Зависимости

Зависимостей нет.

Ссылка: cwtch.im/cwtch#152
Описание отсутствует.