@@ -4,67 +4,67 @@ version: '3.9'
4
4
services :
5
5
# App backend service
6
6
# app:
7
- # This service depends on postgres db and keycloak auth. Start that first.
8
- # depends_on:
9
- # db:
10
- # condition: service_healthy
11
- # keycloak:
12
- # condition: service_started
13
- # image: spring-boot-keycloak-docker-postgres:latest
14
- # build:
15
- # context: ./
16
- # dockerfile: "Dockerfile"
17
- # Give the container the name web-app. You can change to something else.
18
- # container_name: web-app
19
- # Forward the exposed port 8080 on the container to port 8080 on the host machine
20
- # ports:
21
- # - "0.0.0.0:8088:8080/tcp"
22
- # - target: 8080
23
- # host_ip: 0.0.0.0
24
- # published: 8088
25
- # protocol: tcp
26
- # mode: host
27
- # ports:
28
- # - "8080:8080"
29
- # networks:
30
- # - backend
31
- # entrypoint: [ "java", "-Xms512m", "-Xmx1g", "-jar" ]
7
+ # This service depends on postgres db and keycloak auth. Start that first.
8
+ # depends_on:
9
+ # db:
10
+ # condition: service_healthy
11
+ # keycloak:
12
+ # condition: service_started
13
+ # image: spring-boot-keycloak-docker-postgres:latest
14
+ # build:
15
+ # context: ./
16
+ # dockerfile: "Dockerfile"
17
+ # Give the container the name web-app. You can change to something else.
18
+ # container_name: web-app
19
+ # Forward the exposed port 8080 on the container to port 8080 on the host machine
20
+ # ports:
21
+ # - "0.0.0.0:8088:8080/tcp"
22
+ # - target: 8080
23
+ # host_ip: 0.0.0.0
24
+ # published: 8088
25
+ # protocol: tcp
26
+ # mode: host
27
+ # ports:
28
+ # - "8080:8080"
29
+ # networks:
30
+ # - backend
31
+ # entrypoint: [ "java", "-Xms512m", "-Xmx1g", "-jar" ]
32
32
# Database Service (Postgres)
33
33
# db:
34
- # Give the container the name postgres-db. You can change to something else.
35
- # container_name: postgres-db
36
- # Use the Docker Image postgres. This will pull the 14 version.
37
- # image: postgres:14-alpine
38
- # healthcheck:
39
- # test: [ "CMD", "pg_isready", "-q", "-d", "postgres", "-U" ]
40
- # timeout: 45s
41
- # interval: 10s
42
- # retries: 10
43
- # restart: always
44
- # Set a volume some that database is not lost after shutting down the container.
45
- # I used the name postgres-data, but you can change it to something else.
46
- # volumes:
47
- # - postgres_data_keycloak:/var/lib/postgresql/data
48
- # networks:
49
- # - backend
50
- # network_mode: host
51
- # Maps port 5432 (localhost) to port 5432 on the container. You can change the ports to fix your needs.
52
- # ports:
53
- # - "5432:5432"
54
- # Set up the username, password, and database name. You can change these values.
55
- # environment:
56
- # POSTGRES_USER: postgres
57
- # POSTGRES_PASSWORD: postgres
58
- # POSTGRES_DB: automobiles
59
- # PGDATA: /var/lib/postgresql/data/pgdata
34
+ # Give the container the name postgres-db. You can change to something else.
35
+ # container_name: postgres-db
36
+ # Use the Docker Image postgres. This will pull the 14 version.
37
+ # image: postgres:14-alpine
38
+ # healthcheck:
39
+ # test: [ "CMD", "pg_isready", "-q", "-d", "postgres", "-U" ]
40
+ # timeout: 45s
41
+ # interval: 10s
42
+ # retries: 10
43
+ # restart: always
44
+ # Set a volume some that database is not lost after shutting down the container.
45
+ # I used the name postgres-data, but you can change it to something else.
46
+ # volumes:
47
+ # - postgres_data_keycloak:/var/lib/postgresql/data
48
+ # networks:
49
+ # - backend
50
+ # network_mode: host
51
+ # Maps port 5432 (localhost) to port 5432 on the container. You can change the ports to fix your needs.
52
+ # ports:
53
+ # - "5432:5432"
54
+ # Set up the username, password, and database name. You can change these values.
55
+ # environment:
56
+ # POSTGRES_USER: postgres
57
+ # POSTGRES_PASSWORD: postgres
58
+ # POSTGRES_DB: automobiles
59
+ # PGDATA: /var/lib/postgresql/data/pgdata
60
60
# Auth service
61
61
keycloak :
62
62
container_name : keycloak-auth
63
63
image : quay.io/keycloak/keycloak:22.0.1
64
- # build:
65
- # context: .
66
- # args:
67
- # KEYCLOAK_VERSION: 22.0.1
64
+ # build:
65
+ # context: .
66
+ # args:
67
+ # KEYCLOAK_VERSION: 22.0.1
68
68
command :
69
69
- " start-dev"
70
70
ports :
@@ -81,7 +81,7 @@ services:
81
81
KC_DB_PASSWORD : password
82
82
KC_HEALTH_ENABLED : true
83
83
depends_on :
84
- - keycloak-db
84
+ - keycloak-db
85
85
# volumes:
86
86
# - /home/keycloak/automobile-realm.json:/opt/keycloak/data/import/automobile-realm.json
87
87
# Database Service (Postgres) for Keycloak
@@ -96,22 +96,58 @@ services:
96
96
POSTGRES_DB : keycloak
97
97
POSTGRES_USER : keycloak
98
98
POSTGRES_PASSWORD : password
99
- networks :
100
- - keycloak
99
+ networks : [ keycloak ]
101
100
healthcheck :
102
101
test : [ "CMD", "pg_isready", "-q", "-d", "postgres", "-U" ]
103
102
timeout : 45s
104
103
interval : 10s
105
104
retries : 10
106
105
106
+ activemq :
107
+ image : webcenter/activemq:latest
108
+ ports :
109
+ # mqtt
110
+ - " 1883:1883"
111
+ # amqp
112
+ - " 5672:5672"
113
+ # ui
114
+ - " 8161:8161"
115
+ # stomp
116
+ - " 61613:61613"
117
+ # ws
118
+ - " 61614:61614"
119
+ # jms
120
+ - " 61616:61616"
121
+ networks : [ activemq ]
122
+ volumes : [ "activemq-data:/opt/activemq/conf", "activemq-data:/data/activemq", "activemq-data:/var/log/activemq" ]
123
+ environment :
124
+ ACTIVEMQ_REMOVE_DEFAULT_ACCOUNT : " true"
125
+ ACTIVEMQ_ADMIN_LOGIN : admin
126
+ ACTIVEMQ_ADMIN_PASSWORD : password
127
+ ACTIVEMQ_WRITE_LOGIN : write
128
+ ACTIVEMQ_WRITE_PASSWORD : password
129
+ ACTIVEMQ_READ_LOGIN : read
130
+ ACTIVEMQ_READ_PASSWORD : password
131
+ ACTIVEMQ_JMX_LOGIN : jmx
132
+ ACTIVEMQ_JMX_PASSWORD : password
133
+
134
+ ACTIVEMQ_STATIC_TOPICS : static-topic-1;static-topic-2;autoTopic
135
+ ACTIVEMQ_STATIC_QUEUES : static-queue-1;static-queue-2
136
+ ACTIVEMQ_ENABLED_SCHEDULER : " true"
137
+ ACTIVEMQ_MIN_MEMORY : 512
138
+ ACTIVEMQ_MAX_MEMORY : 2048
139
+
107
140
networks :
108
- # backend:
141
+ # backend:
109
142
# name: app
110
- # driver: bridge
143
+ # driver: bridge
111
144
keycloak :
112
145
name : keycloak
113
146
driver : bridge
147
+ activemq : { }
114
148
115
149
volumes :
116
150
postgres_data_keycloak :
117
151
driver : local
152
+ activemq-data :
153
+ driver : local
0 commit comments