Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .buildkite/hooks/environment
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/bash

set -e
9 changes: 9 additions & 0 deletions .buildkite/pipeline.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@

env:
DEBUG: e2e*

steps:
- command: ./build.sh
name: Build
artifact_paths: "logs/**/*"
timeout_in_minutes: 3
30 changes: 30 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Pull base image.
FROM node:4

MAINTAINER Mamadou Bobo Diallo <bobo@edyn.com>


# Define working directory.
WORKDIR /www/app

RUN npm install -g npm

# use changes to package.json to force Docker not to use the cache
# when we change our application's nodejs dependencies:
ADD package.json /tmp/package.json
RUN cd /tmp && npm install
RUN mkdir -p /www/app/ && cp -a /tmp/node_modules /www/app/

ADD . /www/app/
RUN npm run bower
RUN npm run build

# Define default command.
CMD ["node", "web.js"]

VOLUME /var/log/

VOLUME /www/app

# Expose ports.
EXPOSE 80
18 changes: 18 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/bin/bash

set -ex

echo "--- Building docker image"

docker build -t edyn/website .

BUILD_BRANCH=${BUILDKITE_BRANCH:-""}

if [[ "$BUILD_BRANCH" == "master" ]]; then
TAG="lastest"
fi

if [[ "$TAG" != "" ]]; then
docker tag edyn/website edyn/website:$TAG
docker push edyn/website:$TAG
fi
6 changes: 6 additions & 0 deletions config/custom-environment-variables.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"celery": {
"url": "NODE_APP_CELERY_URL",
"token": "NODE_APP_CELERY_TOKEN"
}
}
26 changes: 13 additions & 13 deletions dist/scripts/plugins.js

Large diffs are not rendered by default.

7 changes: 5 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
{
"scripts": {
"bower": "./node_modules/.bin/bower install",
"bower": "./node_modules/.bin/bower --allow-root install",
"server": "./node_modules/.bin/gulp serve",
"build": "./node_modules/.bin/gulp build"
"build": "./node_modules/.bin/gulp build",
"cev": "./node_modules/.bin/cev > config/custom-environment-variables.json"
},
"engines": {
"node": ">=0.12.0"
Expand All @@ -12,6 +13,7 @@
"browser-sync": "^2.2.1",
"del": "^1.1.1",
"gulp": "^3.9.0",
"config-cev-generator": "^0.1.4",
"gulp-autoprefixer": "^2.3.1",
"gulp-cache": "^0.2.8",
"gulp-connect": "^2.0.6",
Expand Down Expand Up @@ -49,6 +51,7 @@
},
"dependencies": {
"body-parser": "^1.14.1",
"bower": "^1.7.9",
"browserify": "^10.2.4",
"browserify-shim": "^3.8.9",
"config": "~1.20.1",
Expand Down