From 7d58e17c9e45eb1108367ef30b58d6c58b19c20f Mon Sep 17 00:00:00 2001 From: "Dylan A. Orshefsky" Date: Wed, 5 Sep 2018 14:27:51 -0400 Subject: [PATCH] remove app from docker, modify .env --- .gitignore | 1 + Dockerfile | 10 ---------- README.md | 9 ++++++--- docker-compose.yml | 8 -------- sample.env | 4 ++-- 5 files changed, 9 insertions(+), 23 deletions(-) delete mode 100644 Dockerfile diff --git a/.gitignore b/.gitignore index 248efc9..8518dc9 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ node_modules .env springroll.log log.txt +app/output.log diff --git a/Dockerfile b/Dockerfile deleted file mode 100644 index 426e432..0000000 --- a/Dockerfile +++ /dev/null @@ -1,10 +0,0 @@ -FROM node:10 - -COPY package.json /package.json -COPY npm-shrinkwrap.json /npm-shrinkwrap.json -RUN npm install -COPY server.js /server.js -COPY .env /.env -COPY app/ /app - -CMD node server.js diff --git a/README.md b/README.md index 2809cde..5919474 100644 --- a/README.md +++ b/README.md @@ -11,9 +11,12 @@ SpringRoll Connect is a content management system built using [NodeJS](https://n * Install the latest version of [Docker](https://www.docker.com/) * Copy `sample.env` to `.env`. You can modify these values, but for development you shouldn't have to -* Run `docker-compose up --build` which should build both the mongo db server and start the node service -* The website should then be available at `localhost:3000` -* You can then seed the database with some information by running `node seed.js` +* Run `docker-compose up --build` which should build both the mongo db server +* Run `node server.js` which should start the application server +* You should then seed the database with some information by running `node seed.js` +* Running `seed.js` will also output the password for a user `admin` +* The website should then be available at `localhost:3000`, and you can log in with your admin credentials from the `seed.js` output + ## License diff --git a/docker-compose.yml b/docker-compose.yml index 8602137..405acf6 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -7,12 +7,4 @@ services: - "27017" ports: - "27017:27017" - app: - build: ./ - depends_on: - - db - env_file: - - .env - ports: - - "3000:3000" diff --git a/sample.env b/sample.env index d624f73..f832a1b 100644 --- a/sample.env +++ b/sample.env @@ -1,5 +1,5 @@ env=development PORT=3000 -MONGO_DATABASE=mongodb://db:27017/connect +MONGO_DATABASE=mongodb://localhost:27017/connect SECRET_KEY=springrollconnect -OUTPUT_LOG=/output.log +OUTPUT_LOG=./output.log