-
Notifications
You must be signed in to change notification settings - Fork 241
/
lucky.go
45 lines (41 loc) · 1.08 KB
/
lucky.go
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
package scanner
import (
"github.com/superfly/flyctl/helpers"
)
func configureLucky(sourceDir string, config *ScannerConfig) (*SourceInfo, error) {
if !checksPass(sourceDir, dirContains("shard.yml", "lucky")) {
return nil, nil
}
s := &SourceInfo{
Family: "Lucky",
Files: templates("templates/lucky"),
Port: 8080,
ReleaseCmd: "lucky db.migrate",
Env: map[string]string{
"PORT": "8080",
"LUCKY_ENV": "production",
"APP_DOMAIN": "APP_FQDN",
},
Secrets: []Secret{
{
Key: "SECRET_KEY_BASE",
Help: "Lucky needs a random, secret key. Use the random default we've generated, or generate your own.",
Generate: func() (string, error) {
return helpers.RandString(64)
},
},
{
Key: "SEND_GRID_KEY",
Help: "Lucky needs a SendGrid API key. For now, we're setting this to unused. You can generate one at https://docs.sendgrid.com/for-developers/sending-email/api-getting-started",
Value: "unused",
},
},
Statics: []Static{
{
GuestPath: "/app/public",
UrlPrefix: "/",
},
},
}
return s, nil
}