ore/conf/application.conf.template
# This is the main configuration file for the application.
# ~~~~~
# Application configuration
# Enable fakeUser to bypass standard authentication in a development environment
application {
baseUrl = "http://localhost:9000"
baseUrl = ${?BASE_URL}
uploadsDir = "uploads"
uploadsDir = ${?UPLOADS_DIR}
# Add a dot at the start of the url to trust all subdomains
trustedUrlHosts = [ ".spongepowered.org" ]
fakeUser {
enabled = false
id = -1
name = "Spongie"
username = "Spongie"
email = "spongie@spongepowered.org"
}
}
# Play configuration
play {
i18n.langs = [ "en", "en-US" ]
evolutions.autocommit = false
evolutions.db.default.autoApply = true
ws.timeout.connection = 10000ms
filters {
enabled += play.filters.csp.CSPFilter
csrf.body.bufferSize = 1000000
csp {
directives = {
block-all-mixed-content = ""
script-src = ${play.filters.csp.nonce.pattern} "'self' https://forums.spongepowered.org https://forums-cdn.spongepowered.org"
style-src = "'self' 'unsafe-inline' https://fonts.googleapis.com https://forums-cdn.spongepowered.org"
img-src = "'self' data: https: http:"
font-src = "'self' https://fonts.gstatic.com"
frame-src = "https://forums.spongepowered.org"
frame-ancestors = "'none'"
}
}
hosts {
allowed = [".spongepowered.org", "localhost:9000"]
}
}
http {
secret.key = "changeme"
secret.key = ${?APPLICATION_SECRET}
session.maxAge = 28d # 4 weeks
parser.maxDiskBuffer = 20MB
parser.maxMemoryBuffer = 1000000
}
}
security {
secure = false
secure = ${?SECURE}
unsafeDownload.maxAge = 600000 # 10 minutes
api {
url = "http://localhost:8000"
url = ${?SPONGE_AUTH_URL}
avatarUrl = ${security.api.url}"/avatar/%s?size=120x120"
key = "changeme"
key = ${?SPONGE_AUTH_API_KEY}
timeout = 10000ms
breaker {
max-failures = 5
timeout = 10s
reset = 5m
}
}
sso {
loginUrl = ${security.api.url}"/sso/"
signupUrl = ${security.api.url}"/sso/signup/"
verifyUrl = ${security.api.url}"/sso/sudo/"
secret = "changeme"
secret = ${?SPONGE_AUTH_SSO_SECRET}
timeout = 2s
reset = 10m
apikey = "changeme"
apikey = ${?SPONGE_AUTH_SSO_API_KEY}
}
}
# Ore configuration
ore {
debug = false
debug-level = 3
staging = true
homepage {
update-interval = 10m
}
channels {
max-name-len = 15
name-regex = "^[a-zA-Z0-9]+$"
color-default = 7
name-default = "Release"
}
pages {
home.name = "Home"
home.message = "Welcome to your new project!"
min-len = 15
max-len = 32000
page.max-len = 75000
}
projects {
max-name-len = 25
max-pages = 50
max-channels = 5
init-load = 25
init-version-load = 10
max-desc-len = 120
file-validate = true
staleAge = 28d
check-interval = 1h
draft-expire = 1d
user-grid-page-size = 30
}
users {
stars-per-page = 5
max-tagline-len = 100
author-page-size = 25
project-page-size = 5
}
orgs {
enabled = true
dummyEmailDomain = "ore.spongepowered.org"
createLimit = 5
}
queue {
max-review-time = 1d
}
api {
session {
public-expiration = 3h
expiration = 14d
check-interval = 5m
}
}
}
mail {
username = "example"
username = ${?ORE_EMAIL_USER}
email = "example@example.com"
email = ${?ORE_EMAIL}
password = "password"
password = ${?ORE_EMAIL_PASSWORD}
smtp.host = "smtp.gmail.com"
smtp.host = ${?ORE_SMTP_HOST}
smtp.port = 465
smtp.port = ${?ORE_SMTP_PORT}
transport.protocol = "smtps" // The outgoing transport protocol
interval = 30s // 30 seconds (millis)
// Custom properties to be added to the Properties object that is passed to
// the JavaMail session. These might vary from SMTP server to server. This
// configuration is set up for GMail with "allow less secure apps" enabled in
// the user settings.
properties = {
"mail.smtps.host"=${mail.smtp.host}
"mail.smtp.port"=${mail.smtp.port}
"mail.smtp.socketFactory.class"="javax.net.ssl.SSLSocketFactory"
"mail.smtp.socketFactory.fallback"=false
"mail.smtp.socketFactory.port"=${mail.smtp.port}
"mail.smtp.smtps.auth"=true
"mail.smtps.quitwait"=false
}
}
# Slick configuration
slick.dbs.default {
profile = "slick.jdbc.PostgresProfile$"
db {
driver = "org.postgresql.Driver"
url = "jdbc:postgresql://localhost/ore"
url = ${?JDBC_DATABASE_URL}
user = "root"
user = ${?JDBC_DATABASE_USERNAME}
password = ""
password = ${?JDBC_DATABASE_PASSWORD}
}
}
# Discourse SSO
discourse {
baseUrl = "https://forums.spongepowered.org"
retryRate = 60000ms
categoryDefault = -1
categoryDefault = ${?DISCOURSE_CATEGORY_OPEN}
categoryDeleted = -1
categoryDeleted = ${?DISCOURSE_CATEGORY_DELETED}
api {
enabled = true
key = "changeme"
key = ${?DISCOURSE_API_KEY}
admin = system
breaker {
max-failures = 5
timeout = 10s
reset = 5m
}
}
}
# Sponge stuff
sponge {
logo = "https://www.spongepowered.org/assets/img/icons/spongie-mark.svg"
icon = "https://www.spongepowered.org/favicon.ico"
service = "Ore"
# Sponsors from high to low donation amounts
sponsors = [
{
"name": "Enjin",
"image": "images/sponsors/enjin.png",
"link": "https://www.enjin.com/"
},
{
"name": "MC Server Hosting",
"image": "images/sponsors/mcserverhosting.png",
"link": "https://mcserverhosting.net/?ref=sponge"
},
{
"name": "CreeperHost",
"image": "images/sponsors/creeperhost.svg",
"link": "https://billing.creeperhost.net/link.php?id=8"
},
{
"name": "Triplequote",
"image": "images/sponsors/triplequote_black.svg",
"link": "https://triplequote.com/hydra"
},
{
"name": "JetBrains",
"image": "images/sponsors/jetbrains.svg",
"link": "https://www.jetbrains.com/"
},
{
"name": "YourKit",
"image": "images/sponsors/yourkit.png",
"link": "https://www.yourkit.com/"
},
{
"name": "GameServerKings",
"image": "images/sponsors/gameserverkings.png",
"link": "https://www.gameserverkings.com/"
}
]
}