forked from ThibautMarechal/turborepo-remote-cache
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.s3.yml
46 lines (42 loc) · 1.26 KB
/
docker-compose.s3.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
version: '3.1'
services:
# turborepo-remote-cache:
# build:
# context: .
# ports:
# - 8080:8080
# environment:
# PORT: 8080
# STORAGE_TYPE: s3
# STORAGE_S3_ENDPOINT: http://minio:9000
# STORAGE_S3_FORCE_PATH_STYLE: 'true'
# STORAGE_S3_ACCESS_KEY_ID: minio
# STORAGE_S3_SECRET_ACCESS_KEY: miniosecretkey
# STORAGE_S3_SSL_ENABLED: 'false'
# STORAGE_S3_BUCKET: turborepo-remote-cache
# DATABASE_URL: postgres://postgres:example@db:5432/turborepo
minio:
image: minio/minio
ports:
- 9000:9000
- 9001:9001
environment:
MINIO_ROOT_USER: ${AWS_ACCESS_KEY_ID:-minio}
MINIO_ROOT_PASSWORD: ${AWS_SECRET_ACCESS_KEY:-miniosecretkey}
command: server /data --console-address ":9001"
volumes:
- ./data/minio:/data
# Create the bucket needed by the service
createbuckets:
image: minio/mc
depends_on:
- minio
entrypoint: >
/bin/sh -c "
sleep 5;
/usr/bin/mc alias set minio http://minio:9000 minio miniosecretkey;
/usr/bin/mc rm -r --force minio/turborepo-remote-cache || true;
/usr/bin/mc mb minio/turborepo-remote-cache;
/usr/bin/mc policy set none minio/turborepo-remote-cache;
exit 0;
"