-
Notifications
You must be signed in to change notification settings - Fork 16
/
docker-compose.yml
50 lines (46 loc) · 1.22 KB
/
docker-compose.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
# For a more secure and flexible setup, consider using environment variables from an .env file.
# Reference: https://docs.docker.com/compose/environment-variables/set-environment-variables/
version: '3.7'
services:
mysql-datasource:
image: mysql:8
container_name: mysql-datasource
ports:
- 4407:3306
environment:
MYSQL_ROOT_PASSWORD: Password@123
MYSQL_DATABASE: cachetropolis
MYSQL_USER: cachetropolis
MYSQL_PASSWORD: Password@123
networks:
- cachetropolis
redis-cache:
image: redis
container_name: redis-cache
ports:
- "7480:6379"
command: redis-server --requirepass "Password@123"
networks:
- cachetropolis
backend-application:
build:
context: ./
dockerfile: Dockerfile
container_name: backend-application
ports:
- 8080:8080
depends_on:
- mysql-datasource
- redis-cache
environment:
MYSQL_URL: jdbc:mysql://mysql-datasource:3306/cachetropolis
MYSQL_USERNAME: cachetropolis
MYSQL_PASSWORD: Password@123
REDIS_HOSTNAME: redis-cache
REDIS_PORT: 6379
REDIS_PASSWORD: Password@123
networks:
- cachetropolis
restart: on-failure:5
networks:
cachetropolis: