-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
156 lines (147 loc) · 3.87 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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
version: '3'
services:
rabbitmq:
image: rabbitmq:management-alpine
container_name: goautowp_rabbitmq_test
restart: always
ports:
- "5672:5672"
- "15672:15672"
mysql:
image: mysql:8
container_name: goautowp_mysql_test
restart: always
environment:
- MYSQL_ROOT_PASSWORD=password
- MYSQL_DATABASE=autowp
ports:
- "3306:3306"
volumes:
- "./test/dump.sql:/dump.sql:ro"
nginx:
image: nginx
container_name: goautowp_nginx_test
restart: always
ports:
- "80:80"
volumes:
- "./test:/usr/share/nginx/html:ro"
postgres:
image: postgres:13-alpine
container_name: goautowp_postgres_test
restart: always
environment:
- POSTGRES_DB=traffic
- POSTGRES_USER=traffic
- POSTGRES_PASSWORD=password
ports:
- "5432:5432"
deploy:
resources:
limits:
cpus: "1"
memory: 8G
reservations:
cpus: "0.25"
memory: 128M
keycloak:
image: bitnami/keycloak:20
container_name: goautowp_keycloak_test
restart: always
environment:
KEYCLOAK_ADMIN_USER: admin
KEYCLOAK_ADMIN_PASSWORD: password
KEYCLOAK_MANAGEMENT_USER: manager
KEYCLOAK_MANAGEMENT_PASSWORD: password
KEYCLOAK_DATABASE_HOST: postgres-keycloak
KEYCLOAK_DATABASE_NAME: keycloak
KEYCLOAK_DATABASE_USER: keycloak
KEYCLOAK_DATABASE_PASSWORD: password
KC_HTTP_RELATIVE_PATH: /auth
KEYCLOAK_EXTRA_ARGS: -Dkeycloak.import=/opt/keycloak/data/import/realm.json
volumes:
- ./test/realm.json:/opt/keycloak/data/import/realm.json
ports:
- "8081:8080"
postgres-keycloak:
image: postgres:13-alpine
container_name: goautowp_postgres_keycloak_test
restart: always
environment:
- POSTGRES_DB=keycloak
- POSTGRES_USER=keycloak
- POSTGRES_PASSWORD=password
ports:
- "5433:5432"
deploy:
resources:
limits:
cpus: "1"
memory: 8G
reservations:
cpus: "0.25"
memory: 128M
redis:
image: redis:alpine
container_name: goautowp_test_redis
restart: always
expose:
- "6379"
ports:
- "6379:6379"
deploy:
resources:
limits:
cpus: "1"
memory: 8G
reservations:
cpus: "0.25"
memory: 128M
minio:
image: quay.io/minio/minio
container_name: goautowp_test_minio
restart: always
privileged: true
environment:
MINIO_ROOT_USER: "AKIAIOSFODNN7EXAMPLE"
MINIO_ROOT_PASSWORD: "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY"
ports:
- "19000:9000"
- "9001:9001"
volumes:
- "./minio/data:/data"
command: server --console-address ":9001" /data
deploy:
resources:
limits:
cpus: "1"
memory: 8G
reservations:
cpus: "0.25"
memory: 16M
createbuckets:
image: minio/mc
container_name: autowp_test_createbuckets
depends_on:
- minio
entrypoint: >
/bin/sh -c "
while ! /usr/bin/mc config host add autowp http://minio:9000 AKIAIOSFODNN7EXAMPLE wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY;
do echo 'Wait minio to startup...' && sleep 1;
done;
/usr/bin/mc mb autowp/format;
/usr/bin/mc anonymous set download autowp/format;
/usr/bin/mc mb autowp/user;
/usr/bin/mc anonymous set download autowp/user;
/usr/bin/mc mb autowp/brand;
/usr/bin/mc anonymous set download autowp/brand;
/usr/bin/mc mb autowp/picture;
/usr/bin/mc anonymous set download autowp/picture;
/usr/bin/mc mb autowp/files;
/usr/bin/mc anonymous set download autowp/files;
/usr/bin/mc mb autowp/test;
/usr/bin/mc anonymous set download autowp/test;
/usr/bin/mc mb autowp/naming;
/usr/bin/mc anonymous set download autowp/naming;
exit 0;
"