Skip to content

Commit 27bfe4b

Browse files
committed
add S3 storage to config
1 parent a468fec commit 27bfe4b

File tree

4 files changed

+87
-29
lines changed

4 files changed

+87
-29
lines changed

docker-compose.override.example.yml

Lines changed: 54 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,62 @@ services:
99
ports:
1010
- 5672:5672
1111

12+
# ----------------------------------------------------------------------
13+
# DOCKER MANAGEMENT APPLICATION
14+
# ----------------------------------------------------------------------
15+
16+
# Allow to see all docker containers running, restart and see log files. (optional)
17+
portainer:
18+
image: portainer/portainer:latest
19+
command:
20+
- --admin-password=${PORTAINER_PASSWORD:-}
21+
- --host=unix:///var/run/docker.sock
22+
restart: unless-stopped
23+
networks:
24+
- clowder
25+
labels:
26+
- "traefik.enable=true"
27+
- "traefik.backend=portainer"
28+
- "traefik.frontend.rule=${TRAEFIK_HOST:-}PathPrefixStrip: /portainer"
29+
- "traefik.website.frontend.whiteList.sourceRange=${TRAEFIK_IPFILTER:-172.16.0.0/12}"
30+
volumes:
31+
- /var/run/docker.sock:/var/run/docker.sock
32+
- portainer:/data
33+
34+
# ----------------------------------------------------------------------
35+
# S3 STORAGE CONTAINER
36+
# ----------------------------------------------------------------------
37+
38+
# S3 storage
39+
minio:
40+
image: minio/minio:latest
41+
command: server /data
42+
restart: unless-stopped
43+
networks:
44+
- clowder
45+
environment:
46+
- MINIO_ACCESS_KEY=${S3_ACCESS_KEY:-clowder}
47+
- MINIO_SECRET_KEY=${S3_SECRET_KEY:-catsarecute}
48+
labels:
49+
- "traefik.enable=true"
50+
- "traefik.backend=minio"
51+
- "traefik.port=9000"
52+
- "traefik.frontend.rule=${TRAEFIK_FRONTEND_RULE:-}PathPrefix:/minio/"
53+
volumes:
54+
- minio-data:/data
55+
56+
# ----------------------------------------------------------------------
57+
# VOLUMES FOR PERSISTENT STORAGE
58+
# ----------------------------------------------------------------------
1259
volumes:
60+
portainer:
61+
minio-data:
62+
driver_opts:
63+
type: none
64+
device: '${PWD}/volumes/minio'
65+
o: bind
1366
mongo:
1467
driver_opts:
1568
type: none
16-
device: '${HOME}/docker/mongo'
69+
device: '${PWD}/volumes/mongo'
1770
o: bind

docker-compose.yml

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -45,28 +45,6 @@ services:
4545
- /var/run/docker.sock:/var/run/docker.sock:ro
4646
- traefik:/config
4747

48-
# ----------------------------------------------------------------------
49-
# DOCKER MANAGEMENT APPLICATION
50-
# ----------------------------------------------------------------------
51-
52-
# Allow to see all docker containers running, restart and see log files. (optional)
53-
portainer:
54-
image: portainer/portainer:latest
55-
command:
56-
- --admin-password=${PORTAINER_PASSWORD:-}
57-
- --host=unix:///var/run/docker.sock
58-
restart: unless-stopped
59-
networks:
60-
- clowder
61-
labels:
62-
- "traefik.enable=true"
63-
- "traefik.backend=portainer"
64-
- "traefik.frontend.rule=${TRAEFIK_HOST:-}PathPrefixStrip: /portainer"
65-
- "traefik.website.frontend.whiteList.sourceRange=${TRAEFIK_IPFILTER:-172.16.0.0/12}"
66-
volumes:
67-
- /var/run/docker.sock:/var/run/docker.sock
68-
- portainer:/data
69-
7048
# ----------------------------------------------------------------------
7149
# CLOWDER APPLICATION
7250
# ----------------------------------------------------------------------
@@ -171,7 +149,6 @@ networks:
171149
# ----------------------------------------------------------------------
172150
volumes:
173151
traefik:
174-
portainer:
175152
clowder-data:
176153
clowder-custom:
177154
mongo:

docker/custom.conf

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,21 @@ smtp.host=${?SMTP_SERVER}
3535

3636
# storage
3737
service.byteStorage=services.filesystem.DiskByteStorageService
38+
service.byteStorage=${?CLOWDER_STORAGE}
39+
40+
# location in case of services.filesystem.DiskByteStorageService
3841
clowder.diskStorage.path="/home/clowder/data"
42+
clowder.diskStorage.path=${?CLOWDER_DISKPATH}
43+
44+
# location in case of services.s3.S3ByteStorageService
45+
clowder.s3.serviceEndpoint="http://minio:9000"
46+
clowder.s3.bucketName=${?S3_ENDPOINT}
47+
clowder.s3.bucketName="clowder"
48+
clowder.s3.bucketName=${?S3_BUCKET}
49+
clowder.s3.accessKey="clowder"
50+
clowder.s3.accessKey=${?S3_ACCESS_KEY}
51+
clowder.s3.secretKey="catsarecute"
52+
clowder.s3.secretKey=${?S3_SECRET_KEY}
3953

4054
# mongo server
4155
mongodbURI="mongodb://mongo:27017/clowder"

env.example

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -64,12 +64,26 @@
6464
#SMTP_SERVER=smtp
6565

6666
# ----------------------------------------------------------------------
67-
# PORTAINER CONFIGURATION
67+
# BYTE STORAGE
6868
# ----------------------------------------------------------------------
6969

70-
# password for portainer admin account
71-
# use docker run --rm httpd:2.4-alpine htpasswd -nbB admin <password> | cut -d ":" -f 2
72-
#PORTAINER_PASSWORD=$2y$05$5meDPBtS3NNxyGhBpYceVOxmFhiiC3uY5KEy2m0YRbWghhBr2EVn2
70+
# backend to store the actual bytes:
71+
# - services.filesystem.DiskByteStorageService
72+
# - services.s3.S3ByteStorageService
73+
#CLOWDER_STORAGE=services.filesystem.DiskByteStorageService
74+
75+
# Storage for services.s3.S3ByteStorageService
76+
#CLOWDER_DISKPATH=/home/clowder/data
77+
78+
# S3 endpoint to use, this assumes a local instance of minio
79+
#S3_ENDPOINT=http://minio:9000
80+
81+
# bucket that holds the data
82+
#S3_BUCKET=clowder
83+
84+
# access to the bucket
85+
#S3_ACCESS_KEY=clowder
86+
#S3_SECRET_KEY=catsarecute
7387

7488
# ----------------------------------------------------------------------
7589
# RABBITMQ CONFIGURATION
@@ -86,4 +100,4 @@
86100
#RABBITMQ_EXCHANGE=clowder
87101

88102
# in case of external rabbitmq, the url to clowder
89-
#RABBITMQ_CLOWDERURL=https://clowder-docker.ncsa.illinois.edu/clowder/
103+
#RABBITMQ_CLOWDERURL=https://clowder-docker.ncsa.illinois.edu/clowder/

0 commit comments

Comments
 (0)