-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
78 lines (76 loc) · 2.01 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
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
version: "3"
volumes:
db-data:
services:
frontend1:
build:
context: ./frontend
dockerfile: ./Dockerfile
args:
- BACKEND=http://localhost:8080
- KEYCLOACK=http://localhost:8081/auth/realms/master/protocol/openid-connect/token
- KEYCLOACK_CLIENT_ID=demo-angular
container_name: demo-frontend1
ports:
- "80:80"
depends_on:
- backend1
- keycloak
keycloak:
container_name: demo-keycloak1
image: jboss/keycloak:6.0.1
ports:
- "8081:8080"
restart: "unless-stopped"
depends_on:
- backend1
volumes:
- ./keystore.jks:/home/keystore.jks
environment:
KEYCLOAK_USER: admin
KEYCLOAK_PASSWORD: 123456
KEYCLOAK_LOGLEVEL: DEBUG
DB_ADDR: mysql
DB_PORT: 3306
DB_USER: keycloak
DB_PASSWORD: keycloak123
DB_DATABASE: keycloak_db
KEYSTORE_STORE_PASSWORD: 123456
KEYSTORE_KEY_PASSWORD: 123456
KEYSTORE_ALIAS: demo-angular
KEYSTORE: /home/keystore.jks
backend1:
build:
context: ./backend
dockerfile: ./Dockerfile
args:
- ENV=production
- DB_IP=mysql
- DB_PORT=3306
- DATABASE_TYPE=MYSQL
- DB_USERNAME=app
- DB_PASSWORD=123
- DB_NAME=crud_angular_spring_boot
- KEYSTORE=/home/keystore.jks
- KEYSTORE_STORE_PASSWORD=123456
- KEYSTORE_KEY_PASSWORD=123456
- KEYSTORE_ALIAS=demo-angular
container_name: demo-backend1
restart: on-failure:5
volumes:
- ./keystore.jks:/home/keystore.jks
ports:
- "8080:8080"
depends_on:
- mysql
mysql:
environment:
- MYSQL_USER=app
- MYSQL_PASSWORD=123
- MYSQL_RANDOM_ROOT_PASSWORD=yes
- MYSQL_DATABASE=crud_angular_spring_boot
container_name: demo-mysql
image: mysql:5.7.26
volumes:
- db-data:/var/lib/mysql:rw
- ./setup_mysql.sql:/docker-entrypoint-initdb.d/setup_mysql.sql