-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.dev.yml
81 lines (73 loc) · 2.05 KB
/
docker-compose.dev.yml
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
services:
frontend:
build:
context: ./fullstack-app-react
dockerfile: Dockerfile.dev
args:
REACT_APP_BACKEND_URL: http://localhost:8082
container_name: fullstack-app-react-container
volumes:
- ./fullstack-app-react:/app
- /app/node_modules
ports:
- "3000:3000"
restart: always
networks:
- my_network
backend:
build:
context: ./fullstack-app-spring-boot
dockerfile: Dockerfile.dev
container_name: fullstack-app-spring-boot-container
volumes:
- ./fullstack-app-spring-boot:/app
- /app/target
ports:
- "8082:8082"
restart: always
networks:
- my_network
environment:
- SPRING_DATASOURCE_URL=jdbc:mysql://fullstack-app-mysql-container:3306/fullstack-app-database?createDatabaseIfNotExist=true
- SPRING_DATASOURCE_USERNAME=root
- SPRING_DATASOURCE_PASSWORD=My5tr0n9My50LPa55word
- SPRING_SERVER_PORT=8082
- APP_DEVICE_LIMIT=2
- APP_SESSION_EXPIRATION=1800000
- JWT_SECRET=uGnsplpiVfI205tFAnsCIXT/EBkM1Lb1cQDqoViNMpg=
- SPRING_DATA_REDIS_HOST=fullstack-app-redis
- SPRING_DATA_REDIS_PORT=6379
- SPRING_DATA_REDIS_PASSWORD=My5tr0n9R3d15Pa55word
- CORS_ALLOWED_ORIGINS=http://localhost:3000
- LOGGING_FILE_NAME=fullstack-app-spring-boot.log
db:
image: mysql:8.0
container_name: fullstack-app-mysql-container
restart: always
environment:
MYSQL_ROOT_PASSWORD: My5tr0n9My50LPa55word
MYSQL_DATABASE: fullstack-app-database
ports:
- "3309:3306"
volumes:
- mysql_data:/var/lib/mysql
networks:
- my_network
redis:
image: redis:7.4
container_name: fullstack-app-redis
ports:
- "6379:6379"
volumes:
- redis_data:/data
networks:
- my_network
restart: always
environment:
- REDIS_PASSWORD=My5tr0n9R3d15Pa55word
command: ["redis-server", "--appendonly", "yes", "--requirepass", "My5tr0n9R3d15Pa55word"]
volumes:
mysql_data:
redis_data:
networks:
my_network: