Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test schema #1

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
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
10 changes: 10 additions & 0 deletions .drone.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
pipeline:
push-image:
image:
plugins/docker
repo:
unitq/sample-callback-server-node
tags:
- ${DRONE_COMMIT_SHA}
- ${DRONE_COMMIT_SHA}--${DRONE_COMMIT_BRANCH}
secrets: [ docker_username, docker_password ]
19 changes: 19 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
FROM node:8

# Create app directory
WORKDIR /usr/src/app

# Install app dependencies
# A wildcard is used to ensure both package.json AND package-lock.json are copied
# where available (npm@5+)
COPY package*.json ./

RUN npm install
# If you are building your code for production
# RUN npm install --only=production

# Bundle app source
COPY . .

EXPOSE 8080
CMD [ "npm", "start" ]
25 changes: 25 additions & 0 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
version: '2.1'
services:
scaleapi-callback-server:
image:
scaleapi:latest
container_name:
scaleapi-callback-server
environment:
- MONGODB_URI=scaleapi-callback-service-db
ports:
- "3000:3000"
# depends_on:
# reviewservice-db:
# condition: service_healthy

scaleapi-callback-service-db:
image:
mongo:3.2.21-jessie
container_name:
scaleapi-callback-service-db
ports:
- "27017:27017"
# healthcheck:
# test: ["CMD", "mysqladmin" ,"ping", "-h", "localhost"]
# timeout: 20s
3 changes: 2 additions & 1 deletion taskModel.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ var schema = new Schema({
instruction: String,
params: Schema.Types.Mixed,
response: Schema.Types.Mixed,
urgency: String
urgency: String,
metadata: Schema.Types.Mixed
});

var model = mongoose.model('task', schema);
Expand Down