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
157
158
159
160
|
services:
# Keycloak Identity Provider
keycloak:
image: quay.io/keycloak/keycloak:26.0.7
container_name: keycloak-iam-test
hostname: keycloak
environment:
KC_BOOTSTRAP_ADMIN_USERNAME: admin
KC_BOOTSTRAP_ADMIN_PASSWORD: admin
KC_HTTP_ENABLED: "true"
KC_HOSTNAME_STRICT: "false"
KC_HOSTNAME_STRICT_HTTPS: "false"
KC_HTTP_RELATIVE_PATH: /
ports:
- "8080:8080"
command: start-dev
networks:
- seaweedfs-iam
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8080/health/ready"]
interval: 10s
timeout: 5s
retries: 5
start_period: 60s
# SeaweedFS Master
weed-master:
image: ${SEAWEEDFS_IMAGE:-local/seaweedfs:latest}
container_name: weed-master
hostname: weed-master
ports:
- "9333:9333"
- "19333:19333"
command: "master -ip=weed-master -port=9333 -mdir=/data"
volumes:
- master-data:/data
networks:
- seaweedfs-iam
healthcheck:
test: ["CMD", "wget", "-q", "--spider", "http://localhost:9333/cluster/status"]
interval: 10s
timeout: 5s
retries: 3
start_period: 10s
# SeaweedFS Volume Server
weed-volume:
image: ${SEAWEEDFS_IMAGE:-local/seaweedfs:latest}
container_name: weed-volume
hostname: weed-volume
ports:
- "8083:8083"
- "18083:18083"
command: "volume -ip=weed-volume -port=8083 -dir=/data -mserver=weed-master:9333 -dataCenter=dc1 -rack=rack1"
volumes:
- volume-data:/data
networks:
- seaweedfs-iam
depends_on:
weed-master:
condition: service_healthy
healthcheck:
test: ["CMD", "wget", "-q", "--spider", "http://localhost:8083/status"]
interval: 10s
timeout: 5s
retries: 3
start_period: 10s
# SeaweedFS Filer
weed-filer:
image: ${SEAWEEDFS_IMAGE:-local/seaweedfs:latest}
container_name: weed-filer
hostname: weed-filer
ports:
- "8888:8888"
- "18888:18888"
command: "filer -ip=weed-filer -port=8888 -master=weed-master:9333 -defaultStoreDir=/data"
volumes:
- filer-data:/data
networks:
- seaweedfs-iam
depends_on:
weed-master:
condition: service_healthy
weed-volume:
condition: service_healthy
healthcheck:
test: ["CMD", "wget", "-q", "--spider", "http://localhost:8888/status"]
interval: 10s
timeout: 5s
retries: 3
start_period: 10s
# SeaweedFS S3 API with IAM
weed-s3:
image: ${SEAWEEDFS_IMAGE:-local/seaweedfs:latest}
container_name: weed-s3
hostname: weed-s3
ports:
- "8333:8333"
environment:
WEED_FILER: "weed-filer:8888"
WEED_IAM_CONFIG: "/config/iam_config.json"
WEED_S3_CONFIG: "/config/test_config.json"
GLOG_v: "3"
command: >
sh -c "
echo 'Starting S3 API with IAM...' &&
weed -v=3 s3 -ip=weed-s3 -port=8333
-filer=weed-filer:8888
-config=/config/test_config.json
-iam.config=/config/iam_config.json
"
volumes:
- ./iam_config.json:/config/iam_config.json:ro
- ./test_config.json:/config/test_config.json:ro
networks:
- seaweedfs-iam
depends_on:
weed-filer:
condition: service_healthy
keycloak:
condition: service_healthy
keycloak-setup:
condition: service_completed_successfully
healthcheck:
test: ["CMD", "wget", "-q", "--spider", "http://localhost:8333"]
interval: 10s
timeout: 5s
retries: 5
start_period: 30s
# Keycloak Setup Service
keycloak-setup:
image: alpine/curl:8.4.0
container_name: keycloak-setup
volumes:
- ./setup_keycloak_docker.sh:/setup.sh:ro
- .:/workspace:rw
working_dir: /workspace
networks:
- seaweedfs-iam
depends_on:
keycloak:
condition: service_healthy
command: >
sh -c "
apk add --no-cache bash jq &&
chmod +x /setup.sh &&
/setup.sh
"
volumes:
master-data:
volume-data:
filer-data:
networks:
seaweedfs-iam:
driver: bridge
|