Page MenuHomeDevCentral

Deploy nasqueron/notifications docker image on Dwellers
Closed, ResolvedPublic

Description

Application configuration

The notifications center follows http://12factor.net/ principle to store configuration as environment variables.

  • We should store configuration somewhere and pass it at container creation through -e …

GitHub

  • We need in nasqueron orgz to replace the dev environment by the prod one. That's enough for nasqueron/* events.

Docker Hub

Phabricator

Dæghrefn

All is fine.

Event Timeline

Sandlayth claimed this task.Jan 19 2016, 12:18

According /etc/nginx/nginx.conf, port assigned for notifications.nasqueron.org is the 37080.

dereckson added a comment.EditedJan 23 2016, 03:48
/usr/local/bin/run-notifications
#!/bin/sh

#   -------------------------------------------------------------
#   Notifications center
#   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#   Author:         Sébastien Santoro aka Dereckson
#   Project:        Nasqueron
#   Created:        2016-01-23
#   Description:    Listen to webhooks, fire notifications to
#                   the broker. Used for CI / IRC notifications.
#   Image:          nasqueron/notifications
#   Services used:  RabbitMQ broker (white-rabbit)
#                   Docker volume   (/data/notifications/storage)
#   -------------------------------------------------------------

#   -------------------------------------------------------------
#   Broker parameters
#
#   Gets credentials from zr
#   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

BROKER_HOST=mq
BROKER_USER=`ssh -i /root/.ssh/id_zr zr@ysul.nasqueron.org getcredentials 56 username`
BROKER_PASS=`ssh -i /root/.ssh/id_zr zr@ysul.nasqueron.org getcredentials 56`
BROKER_VHOST=dev

#   -------------------------------------------------------------
#   Docker parameters
#   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

INSTANCE=notifications
BROKER_INSTANCE=white-rabbit
PORT=37080
STORAGE=/data/notifications/storage

#   -------------------------------------------------------------
#   Runs the container
#   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

mkdir -p $STORAGE
chcon -Rt svirt_sandbox_file_t $STORAGE
chown 431:433 $STORAGE
docker run -dt -v $STORAGE:/var/wwwroot/default/storage \
       --link $BROKER_INSTANCE:$BROKER_HOST -p $PORT:80 \
       -e BROKER_HOST=$BROKER_HOST -e BROKER_VHOST=$BROKER_VHOST \
       -e BROKER_USERNAME=$BROKER_USER -e BROKER_PASSWORD=$BROKER_PASS \
       --name $INSTANCE nasqueron/notifications
dereckson updated the task description. (Show Details)Jan 25 2016, 03:38

GitHub: done for Nasqueron. I've also configured an hook for Wolfplex and Keruald repos.

Phabricator hook updated from dev to prod too

@Kaliiixx Next step is to go to Docker Hub, visit each image settings page, choose Webhooks and add an hook:

Sandlayth updated the task description. (Show Details)Jan 28 2016, 18:58
dereckson added a comment.EditedJan 28 2016, 21:02

Any idea to store somewhere secure files with passwords/credentials?

dereckson closed this task as Resolved.Jul 11 2016, 01:25