manga-server/docker-compose.yml
2024-10-05 18:38:12 +02:00

44 lines
966 B
YAML

services:
app:
build: .
ports:
- '8082:8080'
environment:
- DB_HOST=db
- DB_USER=admin
- DB_PASSWORD=Mono981521
- DB_NAME=manga_database
- PORT=8080
depends_on:
- db
volumes:
- backend_server_app:/app # Use the backend_server_app volume
working_dir: /app # Sets the working directory in the container
command: sh -c "npm install && node app.js" # Command to start the application
db:
image: mysql:8.0
environment:
- MYSQL_ROOT_PASSWORD=Mono981521
- MYSQL_DATABASE=manga_database
volumes:
- db_data_new:/var/lib/mysql
ports:
- '3306:3306'
phpmyadmin:
image: phpmyadmin/phpmyadmin
restart: always
ports:
- '8083:80'
environment:
- PMA_HOST=db
- PMA_USER=admin
- PMA_PASSWORD=Mono981521
depends_on:
- db
volumes:
backend_server_app: # Declare the backend_server_app volume
db_data_new: