Permalink
Browse files

added deploy instructions to Readme.md

  • Loading branch information...
1 parent 54014ce commit 38c4a28d1bc239be489df1321111a227776efa75 @CodingMinds CodingMinds committed May 8, 2012
Showing with 38 additions and 1 deletion.
  1. +38 −1 Readme.md
View
@@ -8,10 +8,47 @@ Everyone can fork this project and build his own community.
## Dependencies
Latest version of [Play Framework 2](https://github.com/playframework/Play20)
+## Deployment
+If you wanna deploy your application ti would be a great idea to change the underlying database.
+We describe here the chnaged which should be done to use an MySQL Backend.
+
+First of all add the jdbc connector to the project dependencies in the file `project/Build.scala`,
+it should look like the following snippet
+```scala
+val appDependencies = Seq(
+ "mysql" % "mysql-connector-java" % "5.1.20"
+)
+```
+
+Then it's time to change the configuration to use the mysql database. Edit the file `conf/application.conf`
+and change the it to smthg like
+```ini
+#db.default.driver=org.h2.Driver
+#db.default.url="jdbc:h2:mem:play"
+#db.default.user=sa
+#db.default.password=
+
+db.default.driver=com.mysql.jdbc.Driver
+db.default.url="jdbc:mysql://127.0.0.1:3306/csn"
+db.default.user=csn
+db.default.pass=yourSecretDatabasePassword
+```
+
+If you have problems whiel connecting to your database check the following things:
+
+* Is mysqld listening on a matching ip ?
+* Is mysqld listening on the matching port ?
+* Are username, password and databsename correct ?
+* If your use dns or hostnames instead of an ip check if they are correct interpreted. localhost could be act realy strange
+* Are there any firewalls which block the connection ?
+* What says hosts.allow and hosts.deny ? Try to add `mysqld : ALL : ALLOW` to `/etc/hosts.allow`
+
+And of course change the `application.secret` in `conf/application.conf` before you deploy.
+
## Participate
* irc://irc.freenode.net/geeksofthedusk
* [Bugreports](https://github.com/GeeksOfTheDusk/ClosedSocialNetwork/issues)
## License
-Closed Social Network is distributed under "GNU General Public License v3" http://www.gnu.org/licenses/gpl.html
+Closed Social Network is distributed under [GNU General Public License v3](http://www.gnu.org/licenses/gpl.html)

0 comments on commit 38c4a28

Please sign in to comment.