Skip to content

Commit

Permalink
Merge pull request speckleworks#164 from speckleworks/job-numbers
Browse files Browse the repository at this point in the history
Job numbers
  • Loading branch information
didimitrie authored Oct 2, 2019
2 parents 00d42f7 + e0cba2e commit 0489c8a
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 15 deletions.
33 changes: 21 additions & 12 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,28 @@ services:
- redis
- mongo
environment:
# Change the variable underneath as it will help users differentiate
# between multiple accounts.
- SERVER_NAME=Docker Speckle Server
# This is used in the encryption of the api access tokens.
# Please change it to something random!
- SESSION_SECRET=helloworld
- REQ_SIZE=16mb
- INDENT_RESPONSES=false
- MONGODB_URI=mongodb://mongo:27017/speckle_docker
- REDIS_URL=redis://redis:6379
- EXPOSE_EMAILS=false
# Please see the example .env file provided for how to properly configure this.
# https://github.com/speckleworks/SpeckleServer/blob/master/.env-base
- SERVER_NAME="Docker Speckle Server"
- CANONICAL_URL="http://localhost:3000"
- SESSION_SECRET="Change Me"
- MAX_PROC=1
- CANONICAL_URL="http://localhost:3000"
- PUBLIC_STREAMS=true
- PLUGIN_DIRS=./node_modules/@speckle,./plugins
- PLUGIN_DIRS="./node_modules/@speckle,./plugins"
- PORT=3000
- IP=0.0.0.0
- MAX_PROC=1
- REQ_SIZE=10mb
- SESSION_SECRET=":D"
- MONGODB_URI="mongodb://localhost:27017/speckle_v3"
- REDIS_URL="redis://localhost:6379"
- INDENT_RESPONSES=false
- EXPOSE_EMAILS=true
- FIRST_USER_ADMIN=true
- PUBLIC_REGISTRATION=true
- USE_LOCAL=true
- REDIRECT_URLS="https://app.speckle.systems"
links:
- redis
- mongo
Expand Down
5 changes: 4 additions & 1 deletion models/DataStream.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,10 @@ var dataStreamSchema = mongoose.Schema( {

// keeps track wether this stream can be edited from the online ui or not.
// it's set by default to NOPE
onlineEditable: { type: Boolean, default: false }
onlineEditable: { type: Boolean, default: false },

jobNumber: { type: String, default: ''}

}, { timestamps: true, strict: false } )

module.exports = mongoose.model( 'DataStream', dataStreamSchema )
4 changes: 2 additions & 2 deletions models/Project.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ var projectSchema = mongoose.Schema( {
canWrite: [ { type: mongoose.Schema.Types.ObjectId, ref: 'User' } ]
},

deleted: { type: Boolean, default: false }
deleted: { type: Boolean, default: false },

// strict false so peeps can expand the schema if they wanna add shit 💩
jobNumber: { type: String, default: ''}
}, { timestamps: true, strict: false } )

module.exports = mongoose.model( 'Project', projectSchema )
3 changes: 3 additions & 0 deletions server.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ const logger = require( './config/logger' )

// load up .env
const configResult = require( 'dotenv' ).config( { path: './.env' } )

process.env.CANONICAL_URL = new URL( process.env.CANONICAL_URL ).origin

if ( configResult.error ) {
logger.debug( chalk.bgRed( 'There is an error in the .env configuration file. Will use the default provided ones (if any).' ) )
}
Expand Down

0 comments on commit 0489c8a

Please sign in to comment.