Git Product home page Git Product logo

warm-huis's Introduction

Mijn Warm Huis

Mijn warm huis is a symfony application that allows a user to check the parameters of his house and get recommendations on how to improve it. It is an expansion of the original "Check je huis", which can be found here: https://github.com/StadGent/Check-Je-Huis/

Requirements

Minimum PHP 7.0.0 is required and composer to perform the installation.

Installation

The following steps can be followed to install the application

  1. Clone this repository and go to the directory of the cloned repo
  2. Copy app/config/parameters.yml.dist to app/config/parameters.yml and modify the file
  3. composer install
  4. At the end of composer install fill in the correct parameters for the application such as database connection details.
  5. app/console doctrine:migrations:migrate
  6. app/console cache:clear && app/console cache:warmup
  7. Dump the assets
  • in production environments dump the assets into public folder: app/console assetic:dump
  • in dev environment symlink the assets: app/console assets:install --symlink

After the steps above are taken, make sure the application is reachable through a URL. Make sure the vhost points to the app's web folder.

Configuration files

The main configuration files reside in app/config with app/config/config.yml as the base file.

The settings in this main file will be overridden with the config of the environment (e.g.: app/config/config_prod.yml).

The parameters from app/config/parameters.yml will then be replaced in the resulting config.

Command line tools

Overview of the most used commands:

  • app/console -e=prod or app/console -e=prod
    • for production, always explicitly set the environment to prod
  • app/console list lists all available commands, optionally filtered by package
    • e.g.: app/console list doctrine:migrations only lists the doctrine migration commands
  • app/console -e=prod cache:clear && app/console -e=prod cache:warmup clears and rebuilds basic bootstrap cache
  • app/console -e=prod assetic:dump compiles css and js files and puts them in the public folder
  • app/console -e=prod doctrine:migrations:status checks if the database is up-to-date
  • app/console -e=prod doctrine:migrations:migrate update the database to the latest version
  • app/console -e=prod fos:user:change-password update the password for a user by username, the default admin user is: admin / 22Pvsepl

Important remarks

  • This application is still based on Symfony 2. We do not plan to upgrade to Symfony 3 right away, but pull reqeusts are welcome!
  • There are integrations with other websites and systems still present in this codebase. It can't be used as is ATM. We will look into making this more generic in the future, but can't guarantee any dates.

Example apache virtualhost

<VirtualHost *:80>
    DocumentRoot /web/warmhuis/web   
    ServerName warmhuis.test   
    SetEnv SYMFONY__ENV prod
    SetEnv SYMFONY__DEBUG 0
    
    <Directory /web/warmhuis/web>
        AllowOverride None
        Options -Indexes +FollowSymLinks
        Require all granted

        <IfModule mod_rewrite.c>
            RewriteEngine On

            <IfModule mod_vhost_alias.c>
                RewriteBase /
            </IfModule>

            RewriteCond %{REQUEST_FILENAME} !-f
            RewriteRule ^(.*)$ app.php [QSA,L]
        </IfModule>
    </Directory>

    <Directory /usr/lib/cgi-bin>
        Require all granted
    </Directory>
    <IfModule mod_fastcgi.c>
        AddHandler php7-fcgi .php
        Action php7-fcgi /php7-fcgi
        Alias /php7-fcgi /usr/lib/cgi-bin/php7-fcgi
        FastCgiExternalServer /usr/lib/cgi-bin/php7-fcgi -socket /var/run/php/php7.0-fpm.sock -idle-timeout 3600 -pass-header Authorization
    </IfModule>
</VirtualHost>

warm-huis's People

Contributors

see2do avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.