diff options
-rw-r--r-- | .travis.yml | 9 | ||||
-rw-r--r-- | Dockerfile | 7 | ||||
-rw-r--r-- | config/database-docker.js | 3 | ||||
-rw-r--r-- | docker-compose.yml | 10 |
4 files changed, 29 insertions, 0 deletions
diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..6feafff --- /dev/null +++ b/.travis.yml @@ -0,0 +1,9 @@ +language: minimal + +services: + - docker + +script: + - docker-compose up --build + - curl -v http://localhost:3000/ + - curl -v http://localhost:3000/new/event/public
\ No newline at end of file diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..65b1725 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,7 @@ +FROM node:13-alpine +WORKDIR /app +ADD package.json package-lock.json /app/ +RUN npm install +COPY . /app/ +RUN cp config/api-example.js config/api.js && cp config/database-docker.js config/database.js +CMD npm start diff --git a/config/database-docker.js b/config/database-docker.js new file mode 100644 index 0000000..78a29a8 --- /dev/null +++ b/config/database-docker.js @@ -0,0 +1,3 @@ +module.exports = { + 'url' : 'mongodb://mongo:27017/gathio' // For local MongoDB connection +}; diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..d16e279 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,10 @@ +version: '3' +services: + gathio: + build: . + links: + - mongo + ports: + - 3000:3000 + mongo: + image: mongo:latest
\ No newline at end of file |