Go to file
afornerot 37bfdb3338
Cadoles/nineskeletor/pipeline/head There was a failure building this commit Details
montée version phpcas et image nineapache
2024-09-28 10:06:59 +02:00
.githooks chore: add code quality tools 2022-09-21 12:16:42 +02:00
.jenkins fixevalidator 2023-01-05 20:07:17 +01:00
.vscode fixevalidator 2023-01-05 20:07:17 +01:00
assets gestion footeré 2023-09-13 17:21:06 +02:00
bin fixevalidator 2023-01-05 20:07:17 +01:00
config maj jasig 2024-09-27 21:00:15 +02:00
migrations fixevalidator 2023-01-05 20:07:17 +01:00
misc montée version phpcas et image nineapache 2024-09-28 10:06:59 +02:00
public fixevalidator 2023-01-05 20:07:17 +01:00
src montée version phpcas et image nineapache 2024-09-28 10:06:59 +02:00
templates gestion footeré 2023-09-13 17:21:06 +02:00
tests fixevalidator 2023-01-05 20:07:17 +01:00
tools fixevalidator 2023-01-05 20:07:17 +01:00
translations fixevalidator 2023-01-05 20:07:17 +01:00
.env maj jasig 2024-09-27 21:00:15 +02:00
.env.local.dist kubernites 2023-06-26 09:20:23 +02:00
.gitignore svg 2023-07-23 15:46:26 +02:00
.nvmrc svg 2023-07-23 15:46:26 +02:00
.php-cs-fixer.dist.php fixevalidator 2023-01-05 20:07:17 +01:00
.php-version fixevalidator 2023-01-05 20:07:17 +01:00
Jenkinsfile fixevalidator 2023-01-05 20:07:17 +01:00
Makefile maj make & dockerfile 2023-09-12 22:17:10 +02:00
README.md first commit symfony 6 2022-07-22 14:06:35 +00:00
commitlint.config.js fixevalidator 2023-01-05 20:07:17 +01:00
composer.json montée version phpcas et image nineapache 2024-09-28 10:06:59 +02:00
composer.lock maj jasig 2024-09-27 21:00:15 +02:00
docker-compose.yml montée version phpcas et image nineapache 2024-09-28 10:06:59 +02:00
package-lock.json svg 2023-07-23 15:46:26 +02:00
package.json kubernites 2023-06-26 09:20:23 +02:00
phpunit.xml.dist fixevalidator 2023-01-05 20:07:17 +01:00
skaffold.yaml kubernites 2023-06-26 09:20:23 +02:00
symfony.lock fixevalidator 2023-01-05 20:07:17 +01:00
webpack.config.js fixevalidator 2023-01-05 20:07:17 +01:00
yarn.lock gestion footeré 2023-09-13 17:21:06 +02:00

README.md

NINESKELETOR

Squelette applicatif symfony

Installation for local dev

curl -1sLf 'https://dl.cloudsmith.io/public/symfony/stable/setup.deb.sh' | sudo -E bash  
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -  
echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list  
apt-get update  
apt-get install git docker-compose composer symfony-cli php php-xml php-zip php-gd php-curl php-pgsql yarn  
git clone https://forge.cadoles.com/Cadoles/nineskeletor.git  
cd nineskeletor  
symfony server:ca:install  
cp .env .env.local  

Change in .env.local APP_SECRET variabile
This secret is the init password for admin user

Change in .env.local MERCURE_JWT_SECRET variable
And report this secret in docker-compose.yml MERCURE_PUBLISHER_JWT_KEY and MERCURE_SUBSCRIBER_JWT_KEY

And finish with

bin/reconfigure.sh

Run for local

symfony server:start

Installation for apache

exec installation for local dev except /bin/reconfigure.sh

Between
Change in .env.local APP_WEBURL variable
For sample

APP_WEBURL=MyDomaine

Change in .env.local MERCURE variable like
The /hub alias must be the same on Apache configuration ProxyPass and ProxyPassReverse

MERCURE_URL=http://MyDomaine/hub/.well-known/mercure
MERCURE_PUBLIC_URL=http://MyDomaine/hub/.well-known/mercure  

Create the file docker-compose.override.yml like
The port 9090 must be the same in the apache configuration ProxyPass and ProxyPassReverse

version: '3'

services:
  mercure:
    ports:
      - "9090:80"    
    environment:
      SERVER_NAME: ':80'
      MERCURE_PUBLISHER_JWT_KEY: '!ChangeMe!'
      MERCURE_SUBSCRIBER_JWT_KEY: '!ChangeMe!'
      MERCURE_EXTRA_DIRECTIVES: |
        cors_origins http://MyDomaine

And finish with

bin/reconfigure.sh

After install and configure apache

apt-get install apache libmodapache2
a2enmod rewrite proxy_http
service apache2 restart

sample apache configuration in /etc/apache2/site-available/000-

<VirtualHost *:80>
	DocumentRoot /var/www/html/nineskeletor/public
 	CustomLog /var/log/apache2/access.log common
    ErrorLog /var/log/apache2/error.log

    <Directory /var/www/html/nineskeletor/public>
        DirectoryIndex index.php

        <IfModule mod_negotiation.c>
            Options -MultiViews
        </IfModule>

        <IfModule mod_rewrite.c>
            RewriteEngine On

            RewriteCond %{REQUEST_URI}::$0 ^(/.+)/(.*)::\2$
            RewriteRule .* - [E=BASE:%1]

            RewriteCond %{HTTP:Authorization} .+
            RewriteRule ^ - [E=HTTP_AUTHORIZATION:%0]

            RewriteCond %{ENV:REDIRECT_STATUS} =""
            RewriteRule ^index\.php(?:/(.*)|$) %{ENV:BASE}/$1 [R=301,L]

            RewriteCond %{REQUEST_FILENAME} !-f
            RewriteRule ^ %{ENV:BASE}/index.php [L]
        </IfModule>

        <IfModule !mod_rewrite.c>
            <IfModule mod_alias.c>
                RedirectMatch 307 ^/$ /index.php/
            </IfModule>
        </IfModule>
    </Directory>

    # For mercure server
    ProxyPass /hub/ http://localhost:9090/
    ProxyPassReverse /hub/ http://localhost:9090/

</VirtualHost>

<VirtualHost *:1080>
    # For mailer server
    ProxyPass / http://localhost:1080/
    ProxyPassReverse / http://localhost:1080/
</VirtualHost>

Cron Job

Make sure the cron job is running all the minute
You can copy this bin/nineskeletor.cron in your crontab

cp /var/www/html/nineskeletor/bin/nineskeletor.cron /etc/cron.d/nineskeletor

Messenger worker

Make sure the messenger consume the bus
Needed to send mail You can copy this bin/nineskeletor.service in your systemd

cp /var/www/html/nineskeletor/bin/nineskeletor.service /etc/systemd/system/
systemctl enable nineskeletor.service
systemctl start nineskeletor.service