Compare commits

...

5 Commits

Author SHA1 Message Date
Tykayn 4d0b6a8aed infos deps 2022-12-21 18:37:50 +01:00
Tykayn a83cfb3edf add instructions for production frontend funky
Signed-off-by: tykayn <15d65f2f-0b14-4f70-bf34-e130180ed62b@users.tedomum.net>
2022-12-21 18:33:33 +01:00
Tykayn ee77d61284 ignore frontend folder 2022-12-21 18:19:18 +01:00
Tykayn e3b4d6e196 add frontend instructions 2022-12-21 18:17:22 +01:00
Tykayn cb62739613 up symfony flex with php 8.0 2022-12-21 13:24:09 +01:00
5 changed files with 63 additions and 18 deletions

5
.gitignore vendored
View File

@ -30,7 +30,7 @@ public/main-es5.js
public/polyfills-es2018.js
public/polyfills-es5.js
public/scripts.js
public/styles.css
public/styles.cssup
public/*
###> symfony/phpunit-bridge ###
@ -41,4 +41,5 @@ public/*
node_modules
funky-framadate-front/*
funky-framadate-front
funky-framadate-front
/funky-framadate-front/

View File

@ -124,6 +124,18 @@ php bin/console doctrine:schema:validate
```
## Getting started
Have the right dependencies, a domain name, and run the install script.
### Dependencies
* PHP 8+
* symfony CLI tool
* composer, the PHP dependencies manager
* a database like Mysql
* a proper .env file
### run scripts
```bash
bash update.sh
symfony serve # to start the API on https://localhost:8000
```
# Development
install dependencies with Composer
@ -172,6 +184,12 @@ set a virtual host on your server, configure CORS access to have the API to work
configure database access in a .env.local file , replace variables
DATABASE_URL=mysql://database_user:db_user_password@127.0.0.1:3306/database_name
this file is not versionned and should stay like this.
## Setup the default funky frontend
Use the scripts to get the framadate funky frontend and update it
```bash
bash front_update.sh
```
If you wish to develop things for the frontend, do not rebuild it each time, use a live server in the funky-framadate-front folder.
## cronjob to delete expired polls
you can open your crontabl in command line with :

View File

@ -14,7 +14,10 @@
"preferred-install": {
"*": "dist"
},
"sort-packages": true
"sort-packages": true,
"allow-plugins": {
"symfony/flex": true
}
},
"conflict": {
"symfony/symfony": "*"

25
composer.lock generated
View File

@ -4114,16 +4114,16 @@
},
{
"name": "symfony/flex",
"version": "v1.13.3",
"version": "v1.19.4",
"source": {
"type": "git",
"url": "https://github.com/symfony/flex.git",
"reference": "2597d0dda8042c43eed44a9cd07236b897e427d7"
"reference": "c82477240111bfe41a1067c9f0ab91d40bafa5b6"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/flex/zipball/2597d0dda8042c43eed44a9cd07236b897e427d7",
"reference": "2597d0dda8042c43eed44a9cd07236b897e427d7",
"url": "https://api.github.com/repos/symfony/flex/zipball/c82477240111bfe41a1067c9f0ab91d40bafa5b6",
"reference": "c82477240111bfe41a1067c9f0ab91d40bafa5b6",
"shasum": ""
},
"require": {
@ -4132,16 +4132,13 @@
},
"require-dev": {
"composer/composer": "^1.0.2|^2.0",
"symfony/dotenv": "^4.4|^5.0",
"symfony/filesystem": "^4.4|^5.0",
"symfony/phpunit-bridge": "^4.4|^5.0",
"symfony/process": "^3.4|^4.4|^5.0"
"symfony/dotenv": "^4.4|^5.0|^6.0",
"symfony/filesystem": "^4.4|^5.0|^6.0",
"symfony/phpunit-bridge": "^4.4.12|^5.0|^6.0",
"symfony/process": "^4.4|^5.0|^6.0"
},
"type": "composer-plugin",
"extra": {
"branch-alias": {
"dev-main": "1.13-dev"
},
"class": "Symfony\\Flex\\Flex"
},
"autoload": {
@ -4162,7 +4159,7 @@
"description": "Composer plugin for Symfony",
"support": {
"issues": "https://github.com/symfony/flex/issues",
"source": "https://github.com/symfony/flex/tree/v1.13.3"
"source": "https://github.com/symfony/flex/tree/v1.19.4"
},
"funding": [
{
@ -4178,7 +4175,7 @@
"type": "tidelift"
}
],
"time": "2021-05-19T07:19:15+00:00"
"time": "2022-12-20T07:19:24+00:00"
},
{
"name": "symfony/form",
@ -7614,5 +7611,5 @@
"ext-json": "*"
},
"platform-dev": [],
"plugin-api-version": "2.0.0"
"plugin-api-version": "2.2.0"
}

View File

@ -24,6 +24,32 @@ cecho() {
echo -e "$text"
}
# vérifs prérequis
if [ ! type nvm &> /dev/null ]; then
cecho red " ❌ la commande nvm est introuvable"
exit 1
fi
cecho g " ✅ nvm"
if [ ! type node &> /dev/null ]; then
cecho red " ❌ la commande node est introuvable"
exit 1
fi
cecho g " ✅ node"
if [ ! type git &> /dev/null ]; then
cecho red " ❌ la commande git est introuvable"
exit 1
fi
cecho g " ✅ git"
if [ ! type yarn &> /dev/null ]; then
cecho red " ❌ la commande yarn est introuvable"
exit 1
fi
cecho g " ✅ yarn"
# use node version 16
nvm use 16
cd funky-framadate-front
git reset --hard && git checkout $BRANCH && git pull
cd ..
@ -72,7 +98,7 @@ COUNT_FILES=$(ls -larth ../public |wc -l)
cd ..
cecho b " $COUNT_FILES fichiers de build copiés dans /public"
cecho g "##################################################################"
cecho b " renaming unieque name of JS chunks to common names for templates "
cecho b " renaming unique name of JS chunks to common names for templates "
cd public
mv runtime* runtime.js