-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
66 lines (63 loc) · 1.48 KB
/
docker-compose.yml
File metadata and controls
66 lines (63 loc) · 1.48 KB
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
version: '3.8'
services:
s3dir:
build: .
image: s3dir:latest
container_name: s3dir
ports:
- "8000:8000"
volumes:
- ./data:/data
environment:
- S3DIR_HOST=0.0.0.0
- S3DIR_PORT=8000
- S3DIR_DATA_DIR=/data
- S3DIR_ENABLE_AUTH=false
- S3DIR_READ_ONLY=false
- S3DIR_VERBOSE=false
restart: unless-stopped
healthcheck:
test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:8000/"]
interval: 30s
timeout: 3s
retries: 3
start_period: 5s
# Example with authentication enabled
s3dir-auth:
build: .
image: s3dir:latest
container_name: s3dir-auth
ports:
- "8001:8000"
volumes:
- ./data-auth:/data
environment:
- S3DIR_HOST=0.0.0.0
- S3DIR_PORT=8000
- S3DIR_DATA_DIR=/data
- S3DIR_ENABLE_AUTH=true
- S3DIR_ACCESS_KEY_ID=myaccesskey
- S3DIR_SECRET_ACCESS_KEY=mysecretkey
- S3DIR_READ_ONLY=false
- S3DIR_VERBOSE=true
restart: unless-stopped
profiles:
- auth
# Example read-only mode for serving static files
s3dir-readonly:
build: .
image: s3dir:latest
container_name: s3dir-readonly
ports:
- "8002:8000"
volumes:
- ./public:/data:ro
environment:
- S3DIR_HOST=0.0.0.0
- S3DIR_PORT=8000
- S3DIR_DATA_DIR=/data
- S3DIR_READ_ONLY=true
- S3DIR_VERBOSE=false
restart: unless-stopped
profiles:
- readonly