forked from atlassian/nucleus
-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.template.js
executable file
·186 lines (167 loc) · 5.47 KB
/
config.template.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
const path = require('path');
module.exports = {
/**
* The port to run Nucleus Server on, if the port is in use the server will not start
*/
port: 3030,
/**
* The fully qualified domain + path that Nucleus is being hosted at
*/
baseURL: 'http://localhost:8888',
/**
* The data store to use when persisting plugins and versions. Current possible values
* are "sequelize", ensure you also supply valid connection details for your
* chosen strategy below.
*
* PR's welcome to add another data store.
*/
dbStrategy: 'sequelize',
/**
* Sequelize connection information, please note all options are required
*
* database: The name of the database to connect to
* dialect: The type of SQL database this is, check sequelize docs for more info
* username: Username to use when connecting
* password; Password to use when connecting
* host: Hostname of database
* port: Port to use when connecting
* storage: Path to sqlite file, only used for sqlite dialect
*/
sequelize: {
dialect: 'sqlite',
storage: path.resolve(__dirname, 'db.sqlite'),
},
/**
* The file store to use when persisting update files and metadata. Current possible
* values are "s3" and "local" ensure you also supply valid connection details if
* required for your chosen strategy below.
*
* PR's welcome to add another file store.
*/
fileStrategy: 'local',
/**
* Local file configuration
*
* root: Path on disk to the root of the static file store
* staticUrl: The HTTP url to use to access the static file store remotely
*/
local: {
root: path.resolve(__dirname, '.files'),
staticUrl: 'http://localhost:9999'
},
/**
* There is actually no authentication config for s3, all config must be done through the standard AWS
* environment variables or through EC2 IAM roles.
*
* See http://docs.aws.amazon.com/sdk-for-javascript/v2/developer-guide/setting-credentials-node.html
*
* Bucket / Region / CloudFront config goes here though
*/
s3: {
// init: {
// endpoint: '' // The alternate endpoint to reach the S3 instance at,
// s3ForcePathStyle: true // Always use path style URLs
// }
bucketName: '', // The name for your S3 Bucket
cloudfront: { // If you don't have CloudFront set up and just want to use the S3 bucket set this to "null
distributionId: '', // The CloudFront distribution ID, used for invalidating files
publicUrl: '', // Fully qualified URL for the root of the CloudFront proxy for the S3 bucket
}
},
/**
* The authentication strategy to use when logging users in. Current possible values are "local",
* "openid" and "github". Make you also supply the required authentication details
*/
authStrategy: 'local',
/**
* Local authentication details
*
* The `adminIdentifiers` array should be a list of usernames
*
* DISCLAIMER: This strategy should ONLY be used for local development and NEVER
* used in production. Unicorns cry every time this setting is used in production.
* Don't make the unicorns cry.
*
* displayName: The user friendly name of this user
* username: A unique identifier to use when this user signs in, please note uniqueness is
* not enforced
* password: Well, uhhh, their password
* photo: A URL for their profile, entirely optional, just makes things look nicer ;)
*/
localAuth: [{
displayName: 'Charlie',
username: 'charlie',
password: 'charlie',
photo: 'https://pbs.twimg.com/profile_images/1219364727/charlie-support_400x400.png'
}],
/**
* OpenID authentication details
*
* The `adminIdentifiers` array should be a list of email
* addresses for users to consider admins
*
* realm: The domain that the server is hosted on
* stateless: Stateless mode for openID
* profile: Whether to fetch profile information, should normally be true
* providerURL: Your openID provider URL
* domain: Domain to restrict email addresses to
*/
openid: {
realm: 'http://localhost:8888',
stateless: true,
profile: true,
providerURL: 'https://auth.myservice.com/openid/v2/op',
domain: 'myservice.com'
},
/**
* GitHub authentication details
*
* The `adminIdentifiers` array should be a list of GitHub usernames
* to consider admins
*
* clientID: GitHub API client ID
* clientSecret: GitHub API clientSecret
* realm: The domain the server is hosted on
*/
github: {
clientID: '',
clientSecret: ''
},
/**
* See the documentation for your authentication strategy for what this array does
*/
adminIdentifiers: ['[email protected]', 'charlie'],
/**
* Session options, in development just leave this as default.
*
* IN PRODUCTION PLEASE USE REDIS!
*
* type: Can be either "redis" or null
*
* redis:
* host: The host URL for the redis instance
* port: The port for the redis instance
*/
sessionConfig: {
type: null,
secret: 'ThisIsNotSecret',
redis: {
host: '',
port: ''
}
},
organization: 'My Company Here',
/**
* GPG key to use when signing APT and YUM releases
*
* Requires to be unlocked (no password) and have both the private and
* public key.
*/
gpgSigningKey: 'GPG KEY HERE',
/**
* The default percentage rollout for new releases. The first release for
* any channel will always be 100% but all future releases will have a
* default rollout value of this setting
*/
defaultRollout: 0
};