DevDungeon Instructions

Published on Edited on visitante

This is a remake of NanoDano's devdungeon.com blog, made with Symfony.

Screenshot of the application

Requirements

The application will complain if any other extension is missing. Our DATABASE_URL example in the instructions below assumes MySQL/MariaDB as the database, so we must make sure the pdo_mysql extension is enabled.

Instructions

Clone this repository and cd into it, then install its dependencies through Composer.

$ composer install

Then install Yarn dependencies.

$ yarn install

And build the assets.

$ yarn encore dev

Create the .env.local file and configure it as needed.

DATABASE_URL=mysql://db_user:db_password@127.0.0.1:3306/devdungeon
APP_ENV=dev

Create the database you specified in the last step and execute the doctrine migrations.

$ php bin/console doctrine:migrations:migrate

Load the fixtures. This will create the administrator account, NanoDano, with the password admin.

$ php bin/console doctrine:fixtures:load
  • If you wish, PosterPy can be used to automatically insert many pages filled with blog posts.

Now you may configure your web server and try it at localhost.

Recommendations

  • Use the UTC timezone in your PHP configuration. Localized time will be generated from UTC time as configured by the user or automatically detected by client-side scripting.

Security

The var directory in any Symfony web app comes with 777 permission to ensure PHP will be able to write to it. You can improve the security of this directory by changing its GID to the same user that the web server is running as; or, if applicable, the PHP-FPM process, and then remove "others" write permission. For example, on a Debian based system it will look like this:

UID | GID
doug:www-data

After that, you may remove "others" write permission. Just be sure that the group can write to var.

chmod -R g+w var
chmod -R o-w var

Documentation

Generated with phpDocumentor. To regenerate the documentation, you should obtain the latest PHAR file from their GitHub repository.

Download the PHAR file to the root of this project and execute it:

php phpDocumentor.phar -d src/ -t docs/

The docs/ directory can now be served through your web server. We use docs.devdungeon.org as a link on the footer.

Contributors

  • This website must be usable for users of assistive technologies. Keep that in mind.

License

Copyright 2019 Douglas Silva (0x9fd287d56ec107ac)

This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.

You should have received a copy of the GNU Affero General Public License along with this program. If not, see https://www.gnu.org/licenses/.

1 comment

That's all we have

Nothing yet. Be the first!