fix bdd non permanente

This commit is contained in:
Quentin Roussel
2023-04-03 18:58:08 +02:00
parent 02d556c8fc
commit b1b480caaf
3 changed files with 5 additions and 3 deletions

1
code/db/.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
dbdata

View File

@@ -52,7 +52,7 @@ CREATE TABLE `borne_criteres` (
-- --
INSERT INTO `borne_criteres` (`id`, `nom`) VALUES INSERT INTO `borne_criteres` (`id`, `nom`) VALUES
(1, 'analyse'); (1, 'analyse'),
(2, 'proprete'), (2, 'proprete'),
(3, 'calme'), (3, 'calme'),
(4, 'attente'); (4, 'attente');
@@ -426,4 +426,4 @@ ALTER TABLE `stats_general_mois`
-- --
ALTER TABLE `stats_general_semaine` ALTER TABLE `stats_general_semaine`
MODIFY `id` int NOT NULL AUTO_INCREMENT; MODIFY `id` int NOT NULL AUTO_INCREMENT;
COMMIT; COMMIT;

View File

@@ -9,6 +9,7 @@ services:
- 3306 - 3306
volumes: volumes:
- ./db:/docker-entrypoint-initdb.d - ./db:/docker-entrypoint-initdb.d
- ./db/dbdata:/var/lib/mysql
restart: always restart: always
healthcheck: healthcheck:
test: ["CMD", "mysqladmin" ,"ping", "-h", "localhost", "-uroot"] # Command to check health. test: ["CMD", "mysqladmin" ,"ping", "-h", "localhost", "-uroot"] # Command to check health.
@@ -124,4 +125,4 @@ services:
devices: devices:
- /dev/video0:/dev/video0 - /dev/video0:/dev/video0
- /dev/video2:/dev/video1 - /dev/video2:/dev/video1
- /dev/video3:/dev/video2 - /dev/video3:/dev/video2