forked from k-int/web-toolkit-ce
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
69 lines (65 loc) · 2.13 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
version: "2.1"
volumes:
wt_minio_data:
driver: local
services:
postgres:
container_name: wt_testing_pg
hostname: postgres
# image: postgres:12
image: postgres:10
restart: "no"
command: postgres -c 'max_connections=200'
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=pa55w0rd
- POSTGRES_DB=postgres
volumes:
- ./init.sql:/docker-entrypoint-initdb.d/init.sql
ports:
# - 5432:5432
- 54321:5432
minio:
container_name: wt_minio
hostname: minio
image: docker.io/bitnami/minio:2021
environment:
- MINIO_ROOT_USER=DEVDEVDEV001
- MINIO_ROOT_PASSWORD=DEVDEVDEV001
- MINIO_DEFAULT_BUCKETS=my-first-bucket,my-second-bucket
- MINIO_CONFIG_DIR=/minio_config
volumes:
- wt_minio_data:/data
- ./minio_config:/minio_config
ports:
- 9009:9000
- 9001:9001
setup:
image: minio/mc
depends_on:
- minio
entrypoint: >
/bin/sh -c "
echo sleeping;
sleep 20;
echo This command adds an alias to the mc config file so we can refer to the server as minio;
/usr/bin/mc config host add minio http://minio:9000 DEVDEVDEV001 DEVDEVDEV001;
/usr/bin/mc admin policy add minio/ diku-readwrite /minio_config/diku-readwrite-policy.json;
/usr/bin/mc admin user add minio DIKU_AGG_ACCESS_KEY DIKU_AGG_SECRET_KEY;
/usr/bin/mc admin policy set minio diku-readwrite user=DIKU_AGG_ACCESS_KEY;
/usr/bin/mc mb minio/diku-shared;
/usr/bin/mc mb minio/diku-mod-agreements;
echo List policies known;
/usr/bin/mc admin policy list minio/;
echo List users using json
/usr/bin/mc admin user list --json minio/;
# /usr/bin/mc rm -r --force tn-diku/somebucketname;
# /usr/bin/mc mb tn-diku/somebucketname;
# /usr/bin/mc policy download tn-diku/somebucketname;
# /usr/bin/mc admin config export
# echo Minio user creation: https://docs.min.io/docs/minio-multi-user-quickstart-guide.html
# echo https://github.com/minio/minio/issues/6811 - policy example
exit 0;
"
volumes:
- ./minio_config:/minio_config