Skip to content

Commit

Permalink
Fix #251
Browse files Browse the repository at this point in the history
  • Loading branch information
ponkotuy committed Apr 6, 2016
1 parent 53fb248 commit cc0ab0c
Show file tree
Hide file tree
Showing 5 changed files with 75 additions and 3 deletions.
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ newrelic.yml
newrelic/

# Settings
application.conf
/application.conf
local.conf
/myfleetgirls.keystore
server/conf/application.conf
project/scalikejdbc.properties

# Others
Expand Down
2 changes: 1 addition & 1 deletion README.org
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ $ sbt proxy
+ sbt(sbt-extrasのインストールをお勧め)とMariaDBをインストール
+ server/lib以下に [[https://www.free-decompiler.com/flash/download/]] からLibraryのjarを入れる(以下のdownLibでも可)
+ MariaDBにmyfleetという名前のdatabaseを作成。utf8を有効化する(いくらかのクエリがutf8です)
+ server/conf/application.confを適宜設定(.sampleをコピーして、DB設定を適宜すればいいでしょう)
+ server/conf/local.confを適宜設定(.sampleをコピーして、DB設定を適宜すればいいでしょう)
+ server/public/message にテキストファイル置かないと弊害があるかも

sbtには以下のコマンドがあります。
Expand Down
1 change: 1 addition & 0 deletions server/app/modules/MFGCron.scala
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ class MFGCron @Inject()(val system: ActorSystem) {
onStart()

def onStart(): Unit = {
Thread.sleep(1000L) // scalikejdbcの初期化待ち
beforeStart()
val cron = system.actorOf(Props[CronScheduler], "cron")
cron ! CronSchedule(Cron(0, 5, aster, aster, aster), _ => deleteDailyQuest())
Expand Down
58 changes: 58 additions & 0 deletions server/conf/application.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# This is the main configuration file for the application.
# ~~~~~

# The application languages
# ~~~~~
play.i18n.langs = ["en"]

# Global object class
# ~~~~~
# Define the Global object class for this application.
# Default to Global in the root package.
# application.global=Global

# Router
# ~~~~~
# Define the Router object to use for this application.
# This router will be looked up first when the application is starting up,
# so make sure this is the entry point.
# Furthermore, it's assumed your route file is named properly.
# So for an application router like `my.application.Router`,
# you may need to define a router file `conf/my.application.routes`.
# Default to Routes in the root package (and conf/routes)
# application.router=my.application.Routes

# Database configuration
# ~~~~~
# You can declare as many datasources as you want.
# By convention, the default datasource is named `default`
#
db.default.driver="com.mysql.jdbc.Driver"
db.default.url="jdbc:mysql://localhost:3306/myfleet"
db.default.migration.auto=true

play.modules.enabled += "scalikejdbc.PlayModule"
play.modules.enabled += "org.flywaydb.play.PlayModule"
play.modules.disabled += "play.api.db.DBModule"
play.modules.enabled += "modules.MFGCronModule"

play.http.filters=filters.Filters

# Evolutions
# ~~~~~
# You can disable evolutions if needed
dbplugin=disable
evolutionplugin=disabled

# Logger
# ~~~~~
# You can also configure logback (http://logback.qos.ch/),
# by providing an application-logger.xml file in the conf directory.

# Parser Max Length
play.http.parser.maxMemoryBuffer=1024K

# Assets Cache
"assets.cache./public/proxy.pac"="public, max-age=10800"

include classpath("local.conf")
13 changes: 13 additions & 0 deletions server/conf/local.conf.sample
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@

# Secret key
# ~~~~~
# The secret key is used to secure cryptographics functions.
# If you deploy your application to several instances be sure to use the same key!
play.crypto.secret=

db.default.username=
db.default.password=

# Common Key for Atom ID
# uniqueな任意の文字列を入れてください。自分の管理下にあるドメイン名か乱数で生成した文字列をお勧めします
atom.common_key=

0 comments on commit cc0ab0c

Please sign in to comment.