The VNDB.org Source Code ------------------------ Quick and dirty setup using Docker # Setup docker build -t vndb . docker volume create --name vndb-data # Run (will run on the foreground) docker run -ti --name vndb -p 3000:3000 -v vndb-data:/var/lib/postgresql -v "`pwd`":/var/www --rm vndb # While running, if you need another terminal into the container docker exec -ti vndb bash # root shell docker exec -ti vndb su -l devuser # development shell docker exec -ti vndb su postgres -c psql # postgres superuser shell docker exec -ti vndb su devuser -c 'psql -U vndb' # postgres vndb shell Development database There's a small database with a few pre-filled entries for testing purposes. It is automatically imported in the Docker image, but you can also manually import it as follows (requires an initialized DB and needs to be run with a superuser account. WARNING: This throws away anything in the current DB): psql -U postgres vndb -1f util/sql/devdb.sql This database includes two user accounts with the following login: admin / hunter2 user / hunter1 (The development database is still very minimal, feel free to upload an improved DB dump to the forums if you have more data) Requirements (when not using Docker) global requirements: Linux, or an OS that resembles Linux. Chances are VNDB won't run on Windows. PostgreSQL 9.3+ (don't try older versions or other SQL databases, it won't work) perl 5.22 recommended, 5.10+ may also work A webserver that works with TUWF (lighttpd and Apache are known to work) (perl 5.22 core modules are not listed.) General: Crypt::ScryptKDF Crypt::URandom DBD::Pg DBI Image::Magick JSON::XS Tie::IxHash util/vndb.pl: Algorithm::Diff::XS Text::MultiMarkdown TUWF HTTP::Server::Simple (optional, but greatly simplifies development setup) FCGI (optional, for running as a FastCGI script) PerlIO::gzip (optional, for output compression) util/multi.pl: APIDump: PerlIO::gzip Core: AnyEvent AnyEvent::Pg IRC: AnyEvent::IRC Maintenance: PerlIO::gzip RG: XML::Parser graphviz (/usr/bin/dot is used by default) util/skingen.pl CSS::Minifier::XS (optional, minimizes CSS output) util/jsgen.pl JavaScript::Minifier::XS (optional, minimizes JS output) uglifyjs (optional, slower but better JS compression) util/spritegen.pl pngcrush (optional) Setup - Make sure all the required dependencies (see above) are installed - Create a suitable data/config.pl, using data/config_example.pl as base. - Run the build system: make - Setup a PostgreSQL server and make sure you can login with some admin user - Initialize the VNDB database (assuming 'postgres' is a superuser): # Create the database & roles psql -U postgres -f util/sql/superuser_init.sql # Set a password for each database role: echo "ALTER ROLE vndb LOGIN PASSWORD 'pwd1'" | psql -U postgres echo "ALTER ROLE vndb_site LOGIN PASSWORD 'pwd2'" | psql -U postgres echo "ALTER ROLE vndb_multi LOGIN PASSWORD 'pwd3'" | psql -U postgres # Now import the rest psql -U vndb -f util/sql/all.sql - Update the vndb_site password in data/config.pl to whatever you set it in the previous step. - (Optional) Import the "Development database" as explained above. - Now simply run: util/vndb-dev-server.pl (Note: At the time of writing, the above command will require the git version of TUWF installed, but I intent to upload a new version to CPAN after a bit more testing). Contact IRC: #vndb @ irc.synirc.net Email: contact@vndb.org License GNU AGPL, see COPYING file for details.