remove buildfiles related to old deployment platform

This commit is contained in:
Riku Rouvila
2015-11-24 20:20:32 +02:00
parent 0e84ebd84c
commit 35fc0b9ea8
4 changed files with 20 additions and 52 deletions

View File

@@ -1,37 +0,0 @@
FROM ubuntu:trusty
MAINTAINER "Niko Kurtti niko@salaliitto.com"
ENV NODE_VER v0.10.25
ENV PORT 9000
RUN apt-get update
RUN apt-get install -y git build-essential libssl-dev curl
RUN groupadd -r koodiklinikka-api && useradd --create-home -r -g koodiklinikka-api koodiklinikka-api
ADD . /home/koodiklinikka/koodiklinikka.fi-api
RUN chown -R koodiklinikka-api:koodiklinikka-api /home/koodiklinikka/koodiklinikka.fi-api
USER koodiklinikka-api
RUN git clone https://github.com/creationix/nvm ~/.nvm
RUN cd ~/.nvm && git checkout `git describe --abbrev=0 --tags`
RUN /bin/bash -c "source ~/.nvm/nvm.sh \
&& nvm install ${NODE_VER} \
&& nvm alias koodiklinikka.fi-api ${NODE_VER}"
WORKDIR /home/koodiklinikka/koodiklinikka.fi-api
RUN /bin/bash -c "source ~/.nvm/nvm.sh \
&& nvm use koodiklinikka.fi-api \
&& npm install"
RUN cp node_modules/newrelic/newrelic.js .
RUN NR_KEY=$(cat config.json |grep newrelic_key|cut -d'"' -f4) && sed -i "s/license key here/$NR_KEY/g" newrelic.js
RUN sed -i "s/My Application/koodiklinikka.fi-api/g" newrelic.js
CMD NODE_ENV=$NODE_ENV PORT=$PORT /bin/bash -c "source ~/.nvm/nvm.sh \
&& nvm use koodiklinikka.fi-api \
&& node index.js >> ~/koodiklinikka.fi-api.log 2>&1"
EXPOSE $PORT

1
Procfile Normal file
View File

@@ -0,0 +1 @@
web: node index.js

View File

@@ -1,15 +0,0 @@
#!/bin/bash
if [[ -z "$1" ]]
then
KEYROOT=$HOME
else
KEYROOT=$1
fi
gem install ejson
ejson --keydir=$KEYROOT/.ejson decrypt config/config.production.ejson > config.json
docker build -t koodiklinikka.fi-api .
rm -rf config.json

19
newrelic.js Normal file
View File

@@ -0,0 +1,19 @@
var config = require('./lib/config');
exports.config = {
/**
* Array of application names.
*/
app_name: ['My Application'],
/**
* Your New Relic license key.
*/
license_key: config.newrelic.key,
logging: {
/**
* Level at which to log. 'trace' is most useful to New Relic when diagnosing
* issues with the agent, 'info' and higher will impose the least overhead on
* production applications.
*/
level: 'info'
}
}