-
-
Notifications
You must be signed in to change notification settings - Fork 57
Expand file tree
/
Copy pathcompose.yaml
More file actions
87 lines (82 loc) · 2.59 KB
/
Copy pathcompose.yaml
File metadata and controls
87 lines (82 loc) · 2.59 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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
# If you are upgrading from the former MinIO-based Compose setup, migrate your
# media before starting this file. See the Docker installation guide:
# https://docs.hollo.social/install/docker/#migrating-from-minio
services:
hollo:
image: ghcr.io/fedify-dev/hollo:canary
ports:
- "3000:3000"
environment:
DATABASE_URL: "postgres://user:password@postgres:5432/database"
SECRET_KEY: "${SECRET_KEY}"
LOG_LEVEL: "${LOG_LEVEL}"
BEHIND_PROXY: "${BEHIND_PROXY}"
# GUKHANMUN: "ko,ko-*"
DRIVE_DISK: s3
STORAGE_URL_BASE: http://localhost:9000/hollo/
S3_REGION: us-east-1
S3_BUCKET: hollo
S3_ENDPOINT_URL: http://rustfs:9000
S3_FORCE_PATH_STYLE: "true"
AWS_ACCESS_KEY_ID: rustfsadmin
AWS_SECRET_ACCESS_KEY: rustfsadmin
# MEDIA_PROXY: off # or "proxy" / "cache" — see docs/install/env
# REMOTE_MEDIA_THUMBNAILS: "on" # set to "off" to skip local thumbnails
depends_on:
postgres:
condition: service_started
rustfs:
condition: service_healthy
create-bucket:
condition: service_completed_successfully
restart: unless-stopped
postgres:
image: postgres:17
environment:
POSTGRES_USER: user
POSTGRES_PASSWORD: password
POSTGRES_DB: database
volumes:
- postgres_data:/var/lib/postgresql/data
restart: unless-stopped
rustfs:
image: rustfs/rustfs:1.0.0-beta.8
ports:
- "9000:9000"
environment:
RUSTFS_ACCESS_KEY: rustfsadmin
RUSTFS_SECRET_KEY: rustfsadmin
volumes:
- rustfs_data:/data
command: ["/data"]
healthcheck:
test: ["CMD", "curl", "-fsS", "http://localhost:9000/health"]
interval: 2s
timeout: 2s
retries: 30
restart: unless-stopped
create-bucket:
image: public.ecr.aws/aws-cli/aws-cli:2.35.21
depends_on:
rustfs:
condition: service_healthy
environment:
AWS_ACCESS_KEY_ID: rustfsadmin
AWS_SECRET_ACCESS_KEY: rustfsadmin
AWS_DEFAULT_REGION: us-east-1
AWS_ENDPOINT_URL: http://rustfs:9000
BUCKET_POLICY: >-
{"Version":"2012-10-17","Statement":[{"Effect":"Allow","Principal":"*","Action":["s3:GetObject"],"Resource":["arn:aws:s3:::hollo/*"]}]}
entrypoint: ["/bin/sh", "-c"]
command:
- |
until aws s3api head-bucket --bucket hollo 2>/dev/null; do
aws s3api create-bucket --bucket hollo && break
sleep 1
done
aws s3api put-bucket-policy \
--bucket hollo \
--policy "$${BUCKET_POLICY}"
volumes:
postgres_data:
rustfs_data: