update db
This commit is contained in:
parent
b0fdfc21b6
commit
8f7c07b162
@ -1,3 +1,5 @@
|
||||
version: '3.8'
|
||||
|
||||
services:
|
||||
app:
|
||||
build: .
|
||||
@ -8,27 +10,21 @@ services:
|
||||
- DB_USER=root
|
||||
- DB_PASSWORD=secret
|
||||
- DB_NAME=manga_database
|
||||
- PORT=8080
|
||||
- PORT=8082
|
||||
depends_on:
|
||||
- db
|
||||
volumes:
|
||||
- backend_server_app:/app # Utilise le volume backend_server_app
|
||||
working_dir: /app # Définit le répertoire de travail dans le conteneur
|
||||
command: sh -c "npm install && node app.js" # Commande pour démarrer l'application
|
||||
|
||||
- .:/app
|
||||
- /app/node_modules
|
||||
db:
|
||||
image: mysql:8.0
|
||||
environment:
|
||||
- MYSQL_ROOT_PASSWORD=secret
|
||||
- MYSQL_DATABASE=manga_database
|
||||
- MYSQL_USER=root
|
||||
- MYSQL_PASSWORD=secret
|
||||
volumes:
|
||||
- db_data_new:/var/lib/mysql
|
||||
- db_data:/var/lib/mysql
|
||||
ports:
|
||||
- '3306:3306'
|
||||
command: --default-authentication-plugin=mysql_native_password # Force l'utilisation du plugin d'authentification natif MySQL pour éviter les problèmes de connexion
|
||||
|
||||
phpmyadmin:
|
||||
image: phpmyadmin/phpmyadmin
|
||||
restart: always
|
||||
@ -42,5 +38,4 @@ services:
|
||||
- db
|
||||
|
||||
volumes:
|
||||
backend_server_app: # Déclare le volume backend_server_app
|
||||
db_data_new: # Déclare le volume db_data_new
|
||||
db_data:
|
||||
|
||||
Loading…
Reference in New Issue
Block a user