Permalink
Browse files

Adding docker-compose requirements

  • Loading branch information...
edefikh committed Apr 12, 2016
1 parent 76500dc commit 667c901391e665a6675c7a95fbafb2be56fab04b
Showing with 91 additions and 0 deletions.
  1. +2 −0 Dockerfile
  2. +71 −0 assets/config.json
  3. +18 −0 assets/entrypoint.sh
@@ -2,3 +2,5 @@
FROM nginx:alpine
COPY dist /usr/share/nginx/html
COPY assets/nginx.conf /etc/nginx/
ADD assets/ /assets
ENTRYPOINT ["/assets/entrypoint.sh"]
@@ -0,0 +1,71 @@
{
"xeniaHost": "${XENIA_URL}",
"pillarHost": "${PILLAR_URL}",
"environment": "${ENV}",
"brand": "${PROJECT}",
"googleAnalyticsId": "${GAID}",
"requireLogin": ${DO_AUTH},
"basicAuthorization": "Basic ${AUTH_TOKEN}",
"dimensions": [
{
"name": "all",
"label": "Anywhere",
"value": "all"
},
{
"name": "sections",
"label": "In a section",
"value": "sections",
"querySet": "dimension_section_list",
"labelField": "description",
"valueField": "description"
}
],
"filters": [
{
"name": "Comments",
"category": "Activity",
"field": "count",
"template": "statistics.comments.<%= dimension %>.all.count",
"description": "total comments",
"min": 0,
"max": 500,
"collection": "user_statistics",
"type": "numberRange"
},
{
"name": "Replied",
"category": "Activity",
"field": "replied_count",
"template": "statistics.comments.<%= dimension %>.all.replied_count",
"description": "replies they have written to others",
"min": 0,
"max": 500,
"collection": "user_statistics",
"type": "numberRange"
},
{
"name": "Replies",
"category": "Response",
"field": "reply_count",
"template": "statistics.comments.<%= dimension %>.all.reply_count",
"description": "times other have replied to them",
"min": 0,
"max": 500,
"collection": "user_statistics",
"type": "numberRange"
},
{
"name": "Replies per Comment",
"category": "Response",
"field": "reply_ratio",
"template": "statistics.comments.<%= dimension %>.all.reply_ratio",
"description": "replies received per comment",
"min": 0,
"max": 500,
"collection": "user_statistics",
"type": "numberRange"
}
]
}

@@ -0,0 +1,18 @@
#!/bin/sh

if [[ -z "$XENIA_URL" ]]; then
export XENIA_URL="http://${XENIA_PORT_4000_TCP_ADDR}:${XENIA_PORT_4000_TCP_PORT}"
fi

if [[ -z "$PILLAR_URL" ]]; then
export PILLAR_URL="http://${PILLAR_PORT_8080_TCP_ADDR}:${PILLAR_PORT_8080_TCP_PORT}"
fi

if [[ -z "$AUTH_TOKEN" ]]; then
export DO_AUTH=false
else
export DO_AUTH=true
fi

envsubst < /assets/config.json > /usr/share/nginx/html/config.json
nginx -g "daemon off;"

0 comments on commit 667c901

Please sign in to comment.