From e970b172e5998cb34711eeda6840bc4751583b5a Mon Sep 17 00:00:00 2001 From: Dorian HODIN Date: Sun, 26 May 2024 17:33:20 +0200 Subject: [PATCH 01/15] =?UTF-8?q?Mise=20=C3=A0=20jour=20de=20'README.md'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 9ff34fa..861def1 100644 --- a/README.md +++ b/README.md @@ -126,7 +126,7 @@ classDiagram - + @@ -134,7 +134,9 @@ classDiagram - + + + From bb0b6a2b47cf2422386b40cd6bba11184efeee51 Mon Sep 17 00:00:00 2001 From: Dorian HODIN Date: Wed, 5 Jun 2024 10:18:07 +0200 Subject: [PATCH 02/15] =?UTF-8?q?Mise=20=C3=A0=20jour=20de=20'README.md'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 861def1..64b8a51 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ # **Fukashitapi** ### Vos rêves valent le coup d'être diffusé -![Symfony](https://img.shields.io/badge/symfony-5.3-green) +![Symfony](https://img.shields.io/badge/symfony-7.0.7-green) From 581ce5e15d6b1b6aa8c0527b82d9f8107806c07e Mon Sep 17 00:00:00 2001 From: Dorian HODIN Date: Wed, 5 Jun 2024 10:28:55 +0200 Subject: [PATCH 03/15] =?UTF-8?q?Mise=20=C3=A0=20jour=20de=20'.drone.yml'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .drone.yml | 44 ++++++++++++++++++++++++++------------------ 1 file changed, 26 insertions(+), 18 deletions(-) diff --git a/.drone.yml b/.drone.yml index 83cf2f1..530fa0e 100644 --- a/.drone.yml +++ b/.drone.yml @@ -2,21 +2,29 @@ kind: pipeline type: docker name: default -# steps: -# - name: deploy-db -# image: hub.codefirst.iut.uca.fr/thomas.bellembois/codefirst-dockerproxy-clientdrone:latest -# environment: -# IMAGENAME: mariadb:10 -# CONTAINERNAME: mysql -# COMMAND: create -# OVERWRITE: true -# PRIVATE: true -# CODEFIRST_CLIENTDRONE_ENV_MARIADB_ROOT_PASSWORD: -# from_secret: db_root_password -# CODEFIRST_CLIENTDRONE_ENV_MARIADB_DATABASE: -# from_secret: db_database -# CODEFIRST_CLIENTDRONE_ENV_MARIADB_USER: -# from_secret: db_user -# CODEFIRST_CLIENTDRONE_ENV_MARIADB_PASSWORD: -# from_secret: db_password -# ADMINS: dorianhodin,corentinrichard,remiarnal,aurianjault +trigger: + event: + - push + +steps: + - name: create-image + image: plugins/docker + settings: + dockerfile: ./Dockerfile + context: . + registry: hub.codefirst.iut.uca.fr + repo: hub.codefirst.iut.uca.fr/dorian.hodin/fukashitapi + username: + from_secret: SECRET_USERNAME + password: + from_secret: SECRET_PASSWD + + - name: deploy-api + image: hub.codefirst.iut.uca.fr/thomas.bellembois/codefirst-dockerproxy-clientdrone:latest + environment: + IMAGENAME: hub.codefirst.iut.uca.fr/dorian.hodin/fukashitapi:latest + CONTAINERNAME: fukashitapi + COMMAND: create + OVERWRITE: true + ADMINS: dorianhodin,aurianjault,corentinrichard,remiarnal + depends_on: [ create-image ] \ No newline at end of file From 02e113ecc77b64672b921f7e8ce5cedc9ddfb3fb Mon Sep 17 00:00:00 2001 From: Dorian HODIN Date: Wed, 5 Jun 2024 10:35:36 +0200 Subject: [PATCH 04/15] Ajouter 'Dockerfile' --- Dockerfile | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..e6692e2 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,9 @@ +FROM php:8.1-apache +RUN apt-get update && apt-get install -y git zip +COPY . /var/www/html +WORKDIR /var/www/html/Config +RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer +RUN composer update --no-autoloader && composer install --no-autoloader +RUN a2enmod rewrite +RUN a2enmod actions +RUN service apache2 restart \ No newline at end of file From 57699a8d4cc0dff919c19f6c5e582635bca45651 Mon Sep 17 00:00:00 2001 From: Dorian HODIN Date: Wed, 5 Jun 2024 10:36:36 +0200 Subject: [PATCH 05/15] =?UTF-8?q?Mise=20=C3=A0=20jour=20de=20'Dockerfile'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index e6692e2..b45bfee 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,7 @@ -FROM php:8.1-apache +FROM php:8.2-apache RUN apt-get update && apt-get install -y git zip COPY . /var/www/html -WORKDIR /var/www/html/Config +WORKDIR /var/www/html RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer RUN composer update --no-autoloader && composer install --no-autoloader RUN a2enmod rewrite From aa7b6b3672730294f8fb14767dc5ced281b713b4 Mon Sep 17 00:00:00 2001 From: Dorian HODIN Date: Wed, 5 Jun 2024 10:38:34 +0200 Subject: [PATCH 06/15] =?UTF-8?q?Mise=20=C3=A0=20jour=20de=20'Dockerfile'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index b45bfee..9df732c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,7 +3,7 @@ RUN apt-get update && apt-get install -y git zip COPY . /var/www/html WORKDIR /var/www/html RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer -RUN composer update --no-autoloader && composer install --no-autoloader +RUN composer install RUN a2enmod rewrite RUN a2enmod actions RUN service apache2 restart \ No newline at end of file From 78a1cb0a7720258f1873d6f47e56159c8dfce21f Mon Sep 17 00:00:00 2001 From: Dorian HODIN Date: Wed, 5 Jun 2024 10:41:54 +0200 Subject: [PATCH 07/15] =?UTF-8?q?Mise=20=C3=A0=20jour=20de=20'.drone.yml'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .drone.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.drone.yml b/.drone.yml index 530fa0e..6ff680a 100644 --- a/.drone.yml +++ b/.drone.yml @@ -13,7 +13,7 @@ steps: dockerfile: ./Dockerfile context: . registry: hub.codefirst.iut.uca.fr - repo: hub.codefirst.iut.uca.fr/dorian.hodin/fukashitapi + repo: hub.codefirst.iut.uca.fr/assasymfony/fukashitapi username: from_secret: SECRET_USERNAME password: From 9b92484a691f1b0184a8593cce7b98daa84c16b0 Mon Sep 17 00:00:00 2001 From: Dorian HODIN Date: Wed, 5 Jun 2024 10:42:43 +0200 Subject: [PATCH 08/15] =?UTF-8?q?Mise=20=C3=A0=20jour=20de=20'.drone.yml'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .drone.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.drone.yml b/.drone.yml index 6ff680a..530fa0e 100644 --- a/.drone.yml +++ b/.drone.yml @@ -13,7 +13,7 @@ steps: dockerfile: ./Dockerfile context: . registry: hub.codefirst.iut.uca.fr - repo: hub.codefirst.iut.uca.fr/assasymfony/fukashitapi + repo: hub.codefirst.iut.uca.fr/dorian.hodin/fukashitapi username: from_secret: SECRET_USERNAME password: From 0783570a3522602a4f1568134f88334fe150c07f Mon Sep 17 00:00:00 2001 From: Dorian HODIN Date: Wed, 5 Jun 2024 10:47:27 +0200 Subject: [PATCH 09/15] =?UTF-8?q?Mise=20=C3=A0=20jour=20de=20'Dockerfile'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Dockerfile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 9df732c..350c72a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -6,4 +6,6 @@ RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local RUN composer install RUN a2enmod rewrite RUN a2enmod actions -RUN service apache2 restart \ No newline at end of file +RUN service apache2 restart +EXPOSE 8080 +ENTRYPOINT ["php","-S","0.0.0.0:8080","-t","./public"] \ No newline at end of file From a4b956654ddce325e891dd9123598b0a5b149787 Mon Sep 17 00:00:00 2001 From: Dorian HODIN Date: Wed, 5 Jun 2024 10:48:40 +0200 Subject: [PATCH 10/15] =?UTF-8?q?Mise=20=C3=A0=20jour=20de=20'Dockerfile'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Dockerfile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 350c72a..e62b562 100644 --- a/Dockerfile +++ b/Dockerfile @@ -7,5 +7,4 @@ RUN composer install RUN a2enmod rewrite RUN a2enmod actions RUN service apache2 restart -EXPOSE 8080 -ENTRYPOINT ["php","-S","0.0.0.0:8080","-t","./public"] \ No newline at end of file +ENTRYPOINT ["php","-S","0.0.0.0:80","-t","./public"] \ No newline at end of file From b14b1d83a01878eac4d71057418152346d5a2827 Mon Sep 17 00:00:00 2001 From: Dorian HODIN Date: Wed, 5 Jun 2024 10:52:01 +0200 Subject: [PATCH 11/15] =?UTF-8?q?Mise=20=C3=A0=20jour=20de=20'.drone.yml'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .drone.yml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/.drone.yml b/.drone.yml index 530fa0e..3efcf81 100644 --- a/.drone.yml +++ b/.drone.yml @@ -7,6 +7,25 @@ trigger: - push steps: + - name: deploy-db + image: hub.codefirst.iut.uca.fr/thomas.bellembois/codefirst-dockerproxy-clientdrone:latest + environment: + IMAGENAME: mariadb:10 + CONTAINERNAME: mysql + COMMAND: create + OVERWRITE: true + #PRIVATE: true + CODEFIRST_CLIENTDRONE_ENV_MARIADB_ROOT_PASSWORD: + from_secret: db_root_password + CODEFIRST_CLIENTDRONE_ENV_MARIADB_DATABASE: + from_secret: db_database + CODEFIRST_CLIENTDRONE_ENV_MARIADB_USER: + from_secret: db_user + CODEFIRST_CLIENTDRONE_ENV_MARIADB_PASSWORD: + from_secret: db_password + ADMINS: dorianhodin,aurianjault,corentinrichard,remiarnal + + - name: create-image image: plugins/docker settings: From 6798e9e3e6cd48159ee8476e61f47c79f9d3798e Mon Sep 17 00:00:00 2001 From: Dorian HODIN Date: Wed, 5 Jun 2024 11:08:48 +0200 Subject: [PATCH 12/15] Ajouter 'vhost.conf' --- vhost.conf | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 vhost.conf diff --git a/vhost.conf b/vhost.conf new file mode 100644 index 0000000..a97cb42 --- /dev/null +++ b/vhost.conf @@ -0,0 +1,21 @@ + + DocumentRoot /var/www/html/public + DirectoryIndex index.php + + + AllowOverride All + Order Allow,Deny + Allow from All + Require all granted + FallbackResource /index.php + + + ErrorLog ${APACHE_LOG_DIR}/error.log + CustomLog ${APACHE_LOG_DIR}/access.log combined + + + RewriteEngine On + RewriteCond %{REQUEST_FILENAME} !-f + RewriteRule ^(.*)$ index.php [QSA,L] + + From be877a91dca815992f0a57a29b52a5a03e1a5c35 Mon Sep 17 00:00:00 2001 From: Dorian HODIN Date: Wed, 5 Jun 2024 11:09:36 +0200 Subject: [PATCH 13/15] =?UTF-8?q?Mise=20=C3=A0=20jour=20de=20'Dockerfile'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Dockerfile | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Dockerfile b/Dockerfile index e62b562..4500f6a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,10 +1,17 @@ FROM php:8.2-apache + RUN apt-get update && apt-get install -y git zip + COPY . /var/www/html WORKDIR /var/www/html + RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer RUN composer install + RUN a2enmod rewrite RUN a2enmod actions + +COPY ./vhost.conf /etc/apache2/sites-available/000-default.conf RUN service apache2 restart + ENTRYPOINT ["php","-S","0.0.0.0:80","-t","./public"] \ No newline at end of file From 023dc266034e2572b43caa782031231e4251622f Mon Sep 17 00:00:00 2001 From: Dorian HODIN Date: Wed, 5 Jun 2024 11:10:07 +0200 Subject: [PATCH 14/15] =?UTF-8?q?Mise=20=C3=A0=20jour=20de=20'.env'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.env b/.env index 1feae60..081dfc3 100644 --- a/.env +++ b/.env @@ -32,3 +32,6 @@ DATABASE_URL="sqlite:///%kernel.project_dir%/var/data.db" ###> nelmio/cors-bundle ### CORS_ALLOW_ORIGIN='^https?://(localhost|127\.0\.0\.1)(:[0-9]+)?$' ###< nelmio/cors-bundle ### + + +BASE_PATH=/Assassymfony-fukashitapi \ No newline at end of file From d35a189b0bea50a43a535a40557e3131ebb5e194 Mon Sep 17 00:00:00 2001 From: Dorian HODIN Date: Wed, 5 Jun 2024 11:10:39 +0200 Subject: [PATCH 15/15] =?UTF-8?q?Mise=20=C3=A0=20jour=20de=20'config/route?= =?UTF-8?q?s.yaml'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config/routes.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/config/routes.yaml b/config/routes.yaml index 41ef814..3732096 100644 --- a/config/routes.yaml +++ b/config/routes.yaml @@ -3,3 +3,4 @@ controllers: path: ../src/Controller/ namespace: App\Controller type: attribute + prefix: /Assassymfony-fukashitapi