-
Notifications
You must be signed in to change notification settings - Fork 593
Expand file tree
/
Copy pathdocker-compose.yaml
More file actions
42 lines (37 loc) · 768 Bytes
/
Copy pathdocker-compose.yaml
File metadata and controls
42 lines (37 loc) · 768 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
version: '3.8'
services:
mysql:
image: mysql:8
container_name: mysql
restart: always
environment:
MYSQL_ROOT_PASSWORD: Aditya
MYSQL_DATABASE: crud_app
volumes:
- mysql-data:/var/lib/mysql
- ./mysql-init:/docker-entrypoint-initdb.d
ports:
- "3306:3306"
backend:
build: ./api
container_name: backend-api
environment:
DB_HOST: mysql
DB_USER: root
DB_PASSWORD: Aditya
DB_NAME: crud_app
JWT_SECRET: devopsShackSuperSecretKey
RESET_ADMIN_PASS: 'true'
depends_on:
- mysql
ports:
- "5000:5000"
frontend:
build: ./client
container_name: frontend-react
ports:
- "3000:80"
depends_on:
- backend
volumes:
mysql-data: