]> _ Git - psq.git/commitdiff
wip #7401 @2
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Tue, 18 Mar 2025 18:58:10 +0000 (19:58 +0100)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Tue, 18 Mar 2025 18:58:10 +0000 (19:58 +0100)
.docker/config/rclone/rclone.conf [new file with mode: 0644]
.docker/images/php-fpm/Dockerfile
.docker/production/docker-compose.yml
.docker/production/update
.idea/deployment.xml
app/Console/Commands/Migration.php

diff --git a/.docker/config/rclone/rclone.conf b/.docker/config/rclone/rclone.conf
new file mode 100644 (file)
index 0000000..bf9765e
--- /dev/null
@@ -0,0 +1,18 @@
+[olds3]
+type = s3
+provider = AWS
+env_auth = false
+access_key_id = AKIAZYI53ESTDP6BLEWY
+secret_access_key = eZ13lOElmfoSemRcdB084xVDXCM6mF/wAziYGHdh
+region = eu-west-3
+location_constraint = eu-west-3
+acl = public-read
+
+[s3]
+type = s3
+provider = Minio
+env_auth = false
+access_key_id = 8dXVPc03OPgwDMJWG96C
+secret_access_key = Twzf9EEx55Kn790nt7oIoN24SO88Pq4IqZKXbv7E
+endpoint = https://s3.dev.prescription-quotidien.com/
+
index 79cdc654cd56d2e973c8e1669983b26ac098e1a9..1d9b81dcef1f97e5a633794892e3e68fe5e0d4f0 100644 (file)
@@ -56,9 +56,8 @@ RUN apt update
 RUN apt -y --no-install-recommends install python3 make g++ build-essential
 
 RUN apt -y --no-install-recommends install locales
-RUN apt -y --no-install-recommends install poppler-utils
-RUN sed -i '/fr_FR.UTF-8/s/^# //g' /etc/locale.gen && \
-    locale-gen
+RUN apt -y --no-install-recommends install poppler-utils rclone
+RUN sed -i '/fr_FR.UTF-8/s/^# //g' /etc/locale.gen && locale-gen
 ENV LANG fr_FR.UTF-8
 ENV LANGUAGE fr_FR:$localshort
 ENV LC_ALL fr_FR.UTF-8
index 1d2eb73c53506ec9953620301c0c6ff4eb738b1c..81fd17f5144150bcf88a6095dac5f6c0e553eed2 100644 (file)
@@ -44,6 +44,8 @@ services:
       - './www/.docker/config/imagemagick/policy.xml:/etc/ImageMagick-6/policy.xml'
       # Passwords
       - './www/.docker/config/passwords:/root/passwords'
+      # Rclone
+      - './www/.docker/config/rclone:/application/.config/rclone'
       # Cron
       - './www/.docker/config/cron/crontab:/etc/crontab'
       # PHP
@@ -112,11 +114,6 @@ services:
       - './www/.docker/config/mariadb:/etc/mysql/conf.d:z'
     networks:
       - presquot
-    logging:
-      driver: json-file
-      options:
-        max-size: 10M
-        max-file: 10
 
   mysqlbackup:
     image: selim13/automysqlbackup
@@ -164,6 +161,7 @@ services:
       - ./typesense:/data
     command: '--data-dir /data --api-key=K4fae5KYZTVj6Wucp5q9 --enable-cors'
 
+
 networks:
   presquot:
     name: presquot
index 0f45896487e0fd83408897e602dcd870d5d9591b..c10b7e1cd3dd1377e6e4bff9a67804780b889abf 100644 (file)
@@ -10,7 +10,10 @@ chown -R 999:999 ./redis
 COMPOSE_DOCKER_CLI_BUILD=1 DOCKER_BUILDKIT=1 docker compose pull
 COMPOSE_DOCKER_CLI_BUILD=1 DOCKER_BUILDKIT=1 docker compose build
 
-docker compose down
+docker compose down -v
 docker compose up -d
 
 ufw-docker allow presquot
+
+chown 0:0 ./www/.docker/config/cron/crontab
+chown 0:0 ./www/.docker/config/sudoers
index 62425351b44644ba5e1acfafaf06a6e3754dcf0d..d01b799a6bf1a6d61bc158de31f9736b34e5ef85 100644 (file)
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <project version="4">
-  <component name="PublishConfigData" autoUpload="Always" serverName="dev.prescription-quotidien.com" confirmBeforeUploading="false" confirmBeforeDeletion="false" showAutoUploadSettingsWarning="false">
+  <component name="PublishConfigData" autoUpload="Always" serverName="dev.prescription-quotidien.com (Host)" confirmBeforeUploading="false" confirmBeforeDeletion="false" showAutoUploadSettingsWarning="false">
     <option name="confirmBeforeDeletion" value="false" />
     <option name="confirmBeforeUploading" value="false" />
     <serverData>
index a10887ab91e269b36212dea34959d64e435b5077..16b182c279b7b82dcdd7fb006170851f5367420d 100644 (file)
@@ -62,5 +62,8 @@ class Migration extends Command
         $mysql = 'mysql -h ' . env('DB_HOST') . ' -u' . env('DB_USERNAME') . ' -p' . env('DB_PASSWORD') . ' ' . env('DB_DATABASE') . ' < ' . $tmp;
         `$mysql`;
         unlink($tmp);
+
+        // Sync S3
+        `rclone sync olds3:prescription-sante s3:presquot`;
     }
 }