diff --git a/Dockerfile b/Dockerfile index ebd55e9..92cb228 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,13 +1,15 @@ -FROM node:4-onbuild +FROM node:latest # MONGOINSTALL RUN apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv EA312927 RUN echo "deb http://repo.mongodb.org/apt/debian wheezy/mongodb-org/3.2 main" | tee /etc/apt/sources.list.d/mongodb-org-3.2.list # Update apt-get sources AND install MongoDB RUN apt-get update && apt-get install -y mongodb-org-server && apt-get install -y mongodb-org-mongos && apt-get install -y mongodb-org-shell -# Create the MongoDB data directory -RUN mkdir -p /data/db -RUN chmod +x dockerstart.sh -CMD ./dockerstart.sh +COPY . /var/gryphon/ +RUN npm install -g node-gyp grunt-cli +RUN cd /var/gryphon && npm install +RUN cd /var/gryphon && grunt config +RUN cd /var/gryphon && grunt +CMD service mongod start && node /var/gryphon/bin/www EXPOSE 3000 -EXPOSE 27017 \ No newline at end of file +EXPOSE 27017 diff --git a/client_config.js.example b/client_config.js.example index e93a1d4..1f6bdc5 100644 --- a/client_config.js.example +++ b/client_config.js.example @@ -32,6 +32,6 @@ var CONFIGURATION = { * be enough, as its generated out of the servers host then. * Example Value: 'localhost:3000/api', window.location.origin + '/api/ */ - API_HOST: window.location.origin + '/api/', + API_HOST: window.location.origin + window.location.pathname + 'api/', }; -module.exports = CONFIGURATION \ No newline at end of file +module.exports = CONFIGURATION diff --git a/dockerstart.sh b/dockerstart.sh deleted file mode 100644 index 1347a4b..0000000 --- a/dockerstart.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/usr/bin/env bash -service mongod start -npm install -g node-gyp -npm install -grunt config -grunt -node ./bin/www \ No newline at end of file