A web-based character creator application for the Eclipse Phase role-playing game.
This work is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License.
You can read the full license description here.
You can download the original source code for EPCC V 1.0 (03.2014) from GitHub.
There is a single configuration file for EPCC: src/php/config.ini. You will need to maintain a separate version of that file outside of this repository for your production environment.
The rest of the information (Eclipse Phase content) is stored in the database. There is a full SQL dump of the database in src/sql/init/FullDatabase.sql.
You will need:
- php 5.6 or greater
- Either: mySql 14.14 or greater
- Or: sqlite3
- Create a sqlite3 database
sed 's/\\n/ /g' FullDatabase.sql > tmp.sql sqlite3 --init tmp.sql FullDatabase.sqlite3
- configure database access in php/config.ini
databasePDO = 'sqlite:../../../sql/init/FullDatabase.sqlite3'
- create a MySql database
CREATE USER 'epcc_www'@'localhost' IDENTIFIED BY '$DATABASE_PASSWORD'; GRANT ALL PRIVILEGES ON EclipsePhaseData.* TO 'epcc_www'@'localhost' WITH GRANT OPTION; CREATE DATABASE EclipsePhaseData; USE EclipsePhaseData;
- Import the database
mysql -h localhost -u epcc_www -p'$DATABASE_PASSWORD' EclipsePhaseData < sql/init/FullDatabase.sql
- configure database access in php/config.ini
databaseUser = "epcc_www" databasePassword = "$DATABASE_PASSWORD" databasePDO = "mysql:dbname=<Database Name>;host=<DATABASE SERVER>("localhost" for local server);port=<Database Port> (for my sql generaly : 3306)"
To save changes made to the Sqlite database run:
echo -e ".once FullDatabase.sql\n.dump"|sqlite3 FullDatabase.sqlite3
WARNING: If you use this feature, skip the sed
step when creating the database.
- Set up the database.
- From a command prompt in the
src
directory runphp -S localhost:8080
- Browse to http://localhost:8080
If you have Docker installed, you can use the docker-compose
command to run EPCC:
cd ep-character-creator/
docker-compose up
This will host EPCC at http://localhost:8080.
The first time you run the command, it will take a few minutes complete, but subsequent runs will be very fast.
If you experience an issue with EPCC not rendering properly, then the database is probably still being seeded. Look at the console output, and wait for mysqld to start accepting connections. The line should look like this:
epcc-db | 2017-09-03T00:41:29.240576Z 0 [Note] mysqld: ready for connections.
In the event that the database needs to be updated, run the command docker volume rm epcharactercreator_epcc-db-data
to delete the database.
Docker will automatically re-build it on next run
- Ensure that the web server is pointing to the src directory.
- IMPORTANT : Remove the "management" and sql folders before making the site publicly accessible!
- Set the Google Analytics Id.
Run docker image build -f Standalone.Dockerfile .
If you would like a pre-build image, see here.