manga-server/docker-compose.yml

44 lines
966 B
YAML
Raw Normal View History

2024-10-05 08:07:31 +00:00
services:
app:
build: .
ports:
2024-10-05 16:05:44 +00:00
- '8082:8080'
2024-10-05 08:07:31 +00:00
environment:
- DB_HOST=db
2024-10-05 15:45:36 +00:00
- DB_USER=admin
- DB_PASSWORD=Mono981521
2024-10-05 08:07:31 +00:00
- DB_NAME=manga_database
- PORT=8080
depends_on:
- db
volumes:
2024-10-05 16:38:12 +00:00
- 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
2024-10-05 15:53:16 +00:00
2024-10-05 08:07:31 +00:00
db:
image: mysql:8.0
environment:
2024-10-05 15:45:36 +00:00
- MYSQL_ROOT_PASSWORD=Mono981521
2024-10-05 08:07:31 +00:00
- MYSQL_DATABASE=manga_database
volumes:
2024-10-05 15:53:16 +00:00
- db_data_new:/var/lib/mysql
2024-10-05 08:07:31 +00:00
ports:
- '3306:3306'
2024-10-05 15:53:16 +00:00
2024-10-05 08:07:31 +00:00
phpmyadmin:
image: phpmyadmin/phpmyadmin
restart: always
ports:
2024-10-05 15:56:54 +00:00
- '8083:80'
2024-10-05 08:07:31 +00:00
environment:
- PMA_HOST=db
2024-10-05 15:45:36 +00:00
- PMA_USER=admin
- PMA_PASSWORD=Mono981521
2024-10-05 08:07:31 +00:00
depends_on:
- db
volumes:
2024-10-05 16:38:12 +00:00
backend_server_app: # Declare the backend_server_app volume
2024-10-05 15:53:16 +00:00
db_data_new: