44 lines
930 B
YAML
44 lines
930 B
YAML
version: '3.8'
|
|
|
|
services:
|
|
app:
|
|
build: .
|
|
ports:
|
|
- '8082:8080'
|
|
environment:
|
|
- DB_HOST=db
|
|
- DB_USER=root
|
|
- DB_PASSWORD=secret
|
|
- DB_NAME=manga_database
|
|
- PORT=8082
|
|
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"
|
|
db:
|
|
image: mysql:8.0
|
|
environment:
|
|
- MYSQL_ROOT_PASSWORD=secret
|
|
- 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=root
|
|
- PMA_PASSWORD=secret
|
|
depends_on:
|
|
- db
|
|
|
|
volumes:
|
|
backend_server_app: # Declare the backend_server_app volume
|
|
db_data_new:
|