-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
45 lines (41 loc) · 896 Bytes
/
Copy pathdocker-compose.yml
File metadata and controls
45 lines (41 loc) · 896 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
services:
backend:
build:
context: .
dockerfile: ./backend/Dockerfile
container_name: backend
ports:
- "8081:8080"
environment:
DB_HOST: "db"
DB_PORT: "3306"
DB_USER: "fzsgball"
DB_PASS: "123456"
DB_NAME: "official_book_library"
depends_on:
- db
frontend:
build:
context: .
dockerfile: ./frontend/Dockerfile
container_name: frontend
ports:
- "8088:80"
depends_on:
- backend
db:
image: mariadb:10.5
container_name: db
environment:
MARIADB_ROOT_PASSWORD: "root_password_for_testing"
MARIADB_USER: "fzsgball"
MARIADB_PASSWORD: "123456"
MARIADB_DATABASE: "official_book_library"
volumes:
- ./init.sql:/docker-entrypoint-initdb.d/init.sql
- db_data:/var/lib/mysql
networks:
default:
driver: bridge
volumes:
db_data: