forked from wiringbits/scala-webapp-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapplication.conf
142 lines (114 loc) · 3.53 KB
/
application.conf
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
# https://www.playframework.com/documentation/latest/Configuration
play.i18n.langs = ["en"]
play.filters.hosts {
allowed = ["localhost", "localhost:9000", "127.0.0.1:9000"]
allowed += ${?APP_ALLOWED_HOST_1}
allowed += ${?APP_ALLOWED_HOST_2}
}
play.http {
secret.key="this doesn't matter no sessions are being used"
secret.key=${?PLAY_APPLICATION_SECRET}
errorHandler = "play.api.http.JsonHttpErrorHandler"
}
play.filters.disabled += "play.filters.csrf.CSRFFilter"
play.filters.enabled += "play.filters.cors.CORSFilter"
db.default {
driver = "org.postgresql.Driver"
host = "localhost:5432"
database = "wiringbits_db"
username = "postgres"
password = "postgres"
host = ${?POSTGRES_HOST}
database = ${?POSTGRES_DATABASE}
username = ${?POSTGRES_USERNAME}
password = ${?POSTGRES_PASSWORD}
url = "jdbc:postgresql://"${db.default.host}"/"${db.default.database}
}
play.evolutions {
autoApply = true
db.default {
enabled = true
# Important because when this is false, failed migrations won't get to the play_evolutions table
# preventing us to fix them manually
autocommit = true
}
}
# Number of database connections
# See https://github.com/brettwooldridge/HikariCP/wiki/About-Pool-Sizing
fixedConnectionPool = 9
play.db {
prototype {
hikaricp.minimumIdle = ${fixedConnectionPool}
hikaricp.maximumPoolSize = ${fixedConnectionPool}
}
}
# Job queue sized to HikariCP connection pool
database.dispatcher {
executor = "thread-pool-executor"
throughput = 1
thread-pool-executor {
fixed-pool-size = ${fixedConnectionPool}
}
}
blocking.dispatcher {
executor = "thread-pool-executor"
throughput = 1
thread-pool-executor {
// very high bound to process lots of blocking operations concurrently
fixed-pool-size = 5000
}
}
play.modules.enabled += "net.wiringbits.modules.ApisModule"
play.modules.enabled += "net.wiringbits.modules.ConfigModule"
play.modules.enabled += "net.wiringbits.modules.ExecutorsModule"
play.modules.enabled += "net.wiringbits.modules.ClockModule"
play.modules.enabled += "net.wiringbits.modules.TasksModule"
play.modules.enabled += "net.wiringbits.modules.DataExplorerModule"
play.modules.enabled += "net.wiringbits.webapp.utils.admin.modules.AdminModule"
play.modules.enabled += "net.wiringbits.webapp.utils.admin.modules.ExecutorsModule"
jwt {
secret = "changeMeBeforeRelease"
secret = ${?JWT_SECRET}
}
email {
senderAddress = "[email protected]"
senderAddress = ${?EMAIL_SENDER_ADDRESS}
}
userTokens {
hmacSecret = "REPLACE ME"
hmacSecret = ${?USER_TOKENS_HMAC_SECRET}
emailVerification {
# expiration time for email verification
expirationTime = "24 hours"
expirationTime = ${?USER_TOKENS_EMAIL_VERIFICATION_EXPIRATION_TIME}
}
resetPassword {
# expiration time for email reset password
expirationTime = "24 hours"
expirationTime = ${?USER_TOKENS_RESET_PASSWORD_EXPIRATION_TIME}
}
}
aws {
region = "us-west-2"
region = ${?AWS_REGION}
accessKeyId = REPLACE_ME
accessKeyId = ${?AWS_ACCESS_KEY_ID}
secretAccessKey = REPLACE_ME
secretAccessKey = ${?AWS_SECRET_ACCESS_KEY}
}
webapp {
host = "http://localhost:8080"
host = ${?WEBAPP_HOST}
}
recaptcha {
# secret key only used for test purposes
secretKey = "6LeIxAcTAAAAAGG-vFI1TnRWxMZNFuojJ4WifJWe"
secretKey = ${?RECAPTCHA_SECRET_KEY}
siteKey = "6LeIxAcTAAAAAGG"
siteKey = ${?RECAPTCHA_SITE_KEY}
}
notificationsTask {
# the NotificationsTask will run every time the period is fullfilled
interval = 1 minutes
interval = ${?NOTIFICATIONS_TASK_INTERVAL}
}