Léo Andrès cff75b3ced
Update wiki link
1 month ago
scripts Sitemap bis 3 months ago
www Update wiki link 1 month ago
.gitignore Sitemap bis 3 months ago
LICENSE.md Upgrade 4 months ago
README.md Fix link 4 months ago
www.zapashcanon.fr-le-ssl.conf Compress .png images, enable caching, serve scaled img 3 months ago
www.zapashcanon.fr.conf HTTP2 3 months ago

README.md

zapashcanon.fr

Source code of my personal website, it's written in PHP and based on the Symfony framework.

Dependencies

You need PHP, PostgreSQL, the PostgreSQL module for PHP, the DOM module for PHP and composer. On a Debian system, you can do:

sudo apt install php postgresql php-pgsql php-xml composer

Set-up the website

Here, we use PostgreSQL, you can use another DBMS, but you'll have to add the corresponding PHP module and to modify the files www/app/config/parameters.yml and www/app/config/config.yml.

Configuring PostgreSQL

You need to choose a username mypguser, a password mypguserpass and a database name mypgdatabase.

# log as the postgres user
sudo su postgres
# launch the psql prompt
psql
# create a user `mypguser` with password `mypguserpass`
CREATE USER mypguser WITH PASSWORD 'mypguserpass';
# create a database `mypgdatabase` with `mypguser` as owner
CREATE DATABASE mypgdatabase OWNER mypguser;

Then, you'll have to put the values of mypguser, mypguserpass and mypgdatabase in the file www/app/config/parameters.yml:

psql_database_name: mypgdatabase
psql_database_user: mypguser
psql_database_password: mypguserpass

Installing dependencies with composer

From the root of the projet:

cd www
composer install

Updating the database schemas

From the root of the projet:

cd www
php bin/console doctrine:schema:update --force

Testing with the built-in server

From the root of the projet:

cd www
php bin/console server:start

The website will be accessible at the local address given in the output.

To stop the server, from the root of the projet:

cd www
php bin/console server:stop