Skip to content

Commit c48098a

Browse files
chrisr-stChris Reed
andauthored
Add local S3 support with MinIO (#54)
* build: add MinIO to services * docs: added documentation for MinIO * style: lint fixes * update: Moved MinIO from services to tools. * docs: edited docs to be inline with current document pattern. * update: Changed ports to avoid conflicting with Xdebug. * docs: Changed ports to avoid conflicting with Xdebug. --------- Co-authored-by: Chris Reed <[email protected]>
1 parent a9decda commit c48098a

File tree

3 files changed

+35
-0
lines changed

3 files changed

+35
-0
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
.DS_Store
22
.idea
3+
docker/data-source-tools/storage
4+
docker/data-source-tools/storage/*
35

README.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ cd ./devop-tools/docker/data-source-services && docker-compose up --build -d
3737
* Optionally included is the following tools:
3838
* phpMyAdmin
3939
* Mailpit
40+
* MinIO
4041

4142
```bash
4243
cd ./devop-tools/docker/data-source-tools && docker-compose up --build -d
@@ -62,6 +63,23 @@ _For mimicking an email inbox (ala mailtrap) for local usage._
6263
* `MAIL_PASSWORD=null`
6364
* `MAIL_ENCRYPTION=null`
6465

66+
### MinIO
67+
_For running an S3 service locally._
68+
69+
* Edit the `/etc/hosts` file on your system and make a reference for `127.0.0.1 s3.docker`
70+
* Open the admin console http://s3.docker:10001 and login.
71+
* username: root
72+
* password: password
73+
* Create an appropriate bucket for each project as needed.
74+
* Modify the project's `.env` as follows:
75+
* `FILESYSTEM_DRIVER=s3`
76+
* `AWS_ACCESS_KEY_ID=root`
77+
* `AWS_SECRET_ACCESS_KEY=password`
78+
* `AWS_DEFAULT_REGION=us-east-1`
79+
* `AWS_BUCKET=[project-bucket-name]`
80+
* `AWS_ENDPOINT=http://s3.docker:10000`
81+
* `AWS_USE_PATH_STYLE_ENDPOINT=true`
82+
6583
---
6684

6785
## Scripts

docker/data-source-tools/docker-compose.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,21 @@ services:
1313
MP_MAX_MESSAGES: 5000
1414
MP_SMTP_AUTH_ACCEPT_ANY: 1
1515
MP_SMTP_AUTH_ALLOW_INSECURE: 1
16+
minio:
17+
hostname: s3.docker
18+
image: minio/minio:latest
19+
container_name: sourcetoad_minio
20+
ports:
21+
- "10000:10000"
22+
- "10001:10001"
23+
volumes:
24+
- ./storage/data:/data
25+
environment:
26+
- MINIO_ROOT_USER=root
27+
- MINIO_ROOT_PASSWORD=password
28+
command: server /data/ --address :10000 --console-address :10001
29+
networks:
30+
- st-internal
1631
phpmyadmin:
1732
image: phpmyadmin/phpmyadmin:latest
1833
container_name: sourcetoad_phpmyadmin

0 commit comments

Comments
 (0)