From d9ab61fb8716bf547ff3dfa8e23ff364413e181a Mon Sep 17 00:00:00 2001 From: Chris Reed Date: Wed, 13 Mar 2024 08:31:41 -0400 Subject: [PATCH 1/7] build: add MinIO to services --- .gitignore | 2 ++ docker/data-source-services/docker-compose.yml | 16 ++++++++++++++++ 2 files changed, 18 insertions(+) diff --git a/.gitignore b/.gitignore index 08302ef..6614acf 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,5 @@ .DS_Store .idea +docker/data-source-services/storage +docker/data-source-services/storage/* diff --git a/docker/data-source-services/docker-compose.yml b/docker/data-source-services/docker-compose.yml index 3c398d8..6dd8495 100755 --- a/docker/data-source-services/docker-compose.yml +++ b/docker/data-source-services/docker-compose.yml @@ -38,6 +38,22 @@ services: - MYSQL_PASSWORD=mariadb_pass networks: - st-internal + minio: + hostname: s3.docker + image: minio/minio:latest + container_name: sourcetoad_minio + ports: + - "9000:9000" + - "9090:9090" + volumes: + - ./storage/data:/data + environment: + - MINIO_ROOT_USER=root + - MINIO_ROOT_PASSWORD=password + command: server /data/ --console-address :9090 + restart: unless-stopped + networks: + - st-internal networks: st-internal: external: true From 93d99f197a6309ec875ee315a91948284d44ca8e Mon Sep 17 00:00:00 2001 From: Chris Reed Date: Wed, 13 Mar 2024 08:33:18 -0400 Subject: [PATCH 2/7] docs: added documentation for MinIO --- README.md | 2 ++ docs/minio/README.md | 29 +++++++++++++++++++++++++++++ 2 files changed, 31 insertions(+) create mode 100644 docs/minio/README.md diff --git a/README.md b/README.md index 3b44fe3..1f1df9e 100644 --- a/README.md +++ b/README.md @@ -30,6 +30,8 @@ cd ./devop-tools/docker/data-source-services && docker-compose up --build -d * Kill, and optionally disable, the `World Wide Web Publishing Service` * Run `set COMPOSE_CONVERT_WINDOWS_PATHS=1` in your CMD or PowerShell terminal * Optionally, [read](https://github.com/docker/compose/issues/4303#issuecomment-379563170) this bug report. +#### MinIO Setup - Local S3 Buckets + * [Setting up MinIO for local development](docs/minio/README.md) ### Optional: Data Source Tools * Optionally included is the following tools: diff --git a/docs/minio/README.md b/docs/minio/README.md new file mode 100644 index 0000000..5f349ba --- /dev/null +++ b/docs/minio/README.md @@ -0,0 +1,29 @@ +# MinIO + +The data source services includes an application called minio. This allows you to run an S3 service locally. You do not need access to AWS to use this service. + +In order for minio to operate, you must follow the following steps after running `docker-compose` for the data source services. + +## Post `docker-compose` Setup + +1. Edit the `/etc/hosts` file on your system and make a reference for +``` +127.0.0.1 s3.docker +``` +2. Open your browser and navigate to the admin console `http://s3.docker:9090` and login to the MinIO admin console. +``` +username: root +password: password +``` +3. Create an appropriate bucket for each project as needed. +4. Modify your project's `.env` file to match the following: +``` +FILESYSTEM_DRIVER=s3 + +AWS_ACCESS_KEY_ID=root +AWS_SECRET_ACCESS_KEY=password +AWS_DEFAULT_REGION=us-east-1 +AWS_BUCKET=[project-bucket-name] +AWS_ENDPOINT=http://s3.docker:9000 +AWS_USE_PATH_STYLE_ENDPOINT=true +``` From 92fb6f4cbed88bbdb47c949858555b521f03dea1 Mon Sep 17 00:00:00 2001 From: Chris Reed Date: Wed, 20 Mar 2024 09:14:13 -0400 Subject: [PATCH 3/7] style: lint fixes --- docs/minio/README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/minio/README.md b/docs/minio/README.md index 5f349ba..51ba23e 100644 --- a/docs/minio/README.md +++ b/docs/minio/README.md @@ -6,17 +6,17 @@ In order for minio to operate, you must follow the following steps after running ## Post `docker-compose` Setup -1. Edit the `/etc/hosts` file on your system and make a reference for +Edit the `/etc/hosts` file on your system and make a reference for ``` 127.0.0.1 s3.docker ``` -2. Open your browser and navigate to the admin console `http://s3.docker:9090` and login to the MinIO admin console. +Open your browser and navigate to the admin console `http://s3.docker:9090` and login to the MinIO admin console. ``` username: root password: password ``` -3. Create an appropriate bucket for each project as needed. -4. Modify your project's `.env` file to match the following: +1. Create an appropriate bucket for each project as needed. +2. Modify your project's `.env` file to match the following: ``` FILESYSTEM_DRIVER=s3 From 575fefa1ec00d71307bf7b9e5d74a9e2ec5180bf Mon Sep 17 00:00:00 2001 From: Chris Reed Date: Wed, 20 Mar 2024 14:31:03 -0400 Subject: [PATCH 4/7] update: Moved MinIO from services to tools. --- .gitignore | 4 ++-- docker/data-source-services/docker-compose.yml | 16 ---------------- docker/data-source-tools/docker-compose.yml | 15 +++++++++++++++ 3 files changed, 17 insertions(+), 18 deletions(-) diff --git a/.gitignore b/.gitignore index 6614acf..f659845 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,5 @@ .DS_Store .idea -docker/data-source-services/storage -docker/data-source-services/storage/* +docker/data-source-tools/storage +docker/data-source-tools/storage/* diff --git a/docker/data-source-services/docker-compose.yml b/docker/data-source-services/docker-compose.yml index 72096e8..15b3b5e 100755 --- a/docker/data-source-services/docker-compose.yml +++ b/docker/data-source-services/docker-compose.yml @@ -39,22 +39,6 @@ services: - MYSQL_PASSWORD=mariadb_pass networks: - st-internal - minio: - hostname: s3.docker - image: minio/minio:latest - container_name: sourcetoad_minio - ports: - - "9000:9000" - - "9090:9090" - volumes: - - ./storage/data:/data - environment: - - MINIO_ROOT_USER=root - - MINIO_ROOT_PASSWORD=password - command: server /data/ --console-address :9090 - restart: unless-stopped - networks: - - st-internal networks: st-internal: external: true diff --git a/docker/data-source-tools/docker-compose.yml b/docker/data-source-tools/docker-compose.yml index 3a21895..ff0ce74 100644 --- a/docker/data-source-tools/docker-compose.yml +++ b/docker/data-source-tools/docker-compose.yml @@ -13,6 +13,21 @@ services: MP_MAX_MESSAGES: 5000 MP_SMTP_AUTH_ACCEPT_ANY: 1 MP_SMTP_AUTH_ALLOW_INSECURE: 1 + minio: + hostname: s3.docker + image: minio/minio:latest + container_name: sourcetoad_minio + ports: + - "9000:9000" + - "9090:9090" + volumes: + - ./storage/data:/data + environment: + - MINIO_ROOT_USER=root + - MINIO_ROOT_PASSWORD=password + command: server /data/ --console-address :9090 + networks: + - st-internal phpmyadmin: image: phpmyadmin/phpmyadmin:latest container_name: sourcetoad_phpmyadmin From 3237f6710f995e7bcb2f989bf30b2c83ee410a55 Mon Sep 17 00:00:00 2001 From: Chris Reed Date: Wed, 20 Mar 2024 14:39:18 -0400 Subject: [PATCH 5/7] docs: edited docs to be inline with current document pattern. --- README.md | 20 ++++++++++++++++++-- docs/minio/README.md | 29 ----------------------------- 2 files changed, 18 insertions(+), 31 deletions(-) delete mode 100644 docs/minio/README.md diff --git a/README.md b/README.md index ccdf805..93cd72c 100644 --- a/README.md +++ b/README.md @@ -30,8 +30,6 @@ cd ./devop-tools/docker/data-source-services && docker-compose up --build -d * Kill, and optionally disable, the `World Wide Web Publishing Service` * Run `set COMPOSE_CONVERT_WINDOWS_PATHS=1` in your CMD or PowerShell terminal * Optionally, [read](https://github.com/docker/compose/issues/4303#issuecomment-379563170) this bug report. -#### MinIO Setup - Local S3 Buckets - * [Setting up MinIO for local development](docs/minio/README.md) --- @@ -39,6 +37,7 @@ cd ./devop-tools/docker/data-source-services && docker-compose up --build -d * Optionally included is the following tools: * phpMyAdmin * Mailpit + * MinIO ```bash cd ./devop-tools/docker/data-source-tools && docker-compose up --build -d @@ -64,6 +63,23 @@ _For mimicking an email inbox (ala mailtrap) for local usage._ * `MAIL_PASSWORD=null` * `MAIL_ENCRYPTION=null` +### MinIO +_For running an S3 service locally._ + +* Edit the `/etc/hosts` file on your system and make a reference for `127.0.0.1 s3.docker` +* Open the admin console `http://s3.docker:9090` and login. + * username: root + * password: password +* Create an appropriate bucket for each project as needed. +* Modify the project's `.env` as follows: + * `FILESYSTEM_DRIVER=s3` + * `AWS_ACCESS_KEY_ID=root` + * `AWS_SECRET_ACCESS_KEY=password` + * `AWS_DEFAULT_REGION=us-east-1` + * `AWS_BUCKET=[project-bucket-name]` + * `AWS_ENDPOINT=http://s3.docker:9000` + * `AWS_USE_PATH_STYLE_ENDPOINT=true` + --- ## Scripts diff --git a/docs/minio/README.md b/docs/minio/README.md deleted file mode 100644 index 51ba23e..0000000 --- a/docs/minio/README.md +++ /dev/null @@ -1,29 +0,0 @@ -# MinIO - -The data source services includes an application called minio. This allows you to run an S3 service locally. You do not need access to AWS to use this service. - -In order for minio to operate, you must follow the following steps after running `docker-compose` for the data source services. - -## Post `docker-compose` Setup - -Edit the `/etc/hosts` file on your system and make a reference for -``` -127.0.0.1 s3.docker -``` -Open your browser and navigate to the admin console `http://s3.docker:9090` and login to the MinIO admin console. -``` -username: root -password: password -``` -1. Create an appropriate bucket for each project as needed. -2. Modify your project's `.env` file to match the following: -``` -FILESYSTEM_DRIVER=s3 - -AWS_ACCESS_KEY_ID=root -AWS_SECRET_ACCESS_KEY=password -AWS_DEFAULT_REGION=us-east-1 -AWS_BUCKET=[project-bucket-name] -AWS_ENDPOINT=http://s3.docker:9000 -AWS_USE_PATH_STYLE_ENDPOINT=true -``` From 229a6de3bf538a45b07ca766cf87c6322e9686a2 Mon Sep 17 00:00:00 2001 From: Chris Reed Date: Tue, 26 Mar 2024 12:41:47 -0400 Subject: [PATCH 6/7] update: Changed ports to avoid conflicting with Xdebug. --- docker/data-source-tools/docker-compose.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docker/data-source-tools/docker-compose.yml b/docker/data-source-tools/docker-compose.yml index ff0ce74..8ecd538 100644 --- a/docker/data-source-tools/docker-compose.yml +++ b/docker/data-source-tools/docker-compose.yml @@ -18,14 +18,14 @@ services: image: minio/minio:latest container_name: sourcetoad_minio ports: - - "9000:9000" - - "9090:9090" + - "10000:10000" + - "10001:10001" volumes: - ./storage/data:/data environment: - MINIO_ROOT_USER=root - MINIO_ROOT_PASSWORD=password - command: server /data/ --console-address :9090 + command: server /data/ --address :10000 --console-address :10001 networks: - st-internal phpmyadmin: From d5ab1920a3e02b1bccda5a7c56f87667ae0c6a16 Mon Sep 17 00:00:00 2001 From: Chris Reed Date: Tue, 26 Mar 2024 13:02:53 -0400 Subject: [PATCH 7/7] docs: Changed ports to avoid conflicting with Xdebug. --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 93cd72c..7f725fb 100644 --- a/README.md +++ b/README.md @@ -67,7 +67,7 @@ _For mimicking an email inbox (ala mailtrap) for local usage._ _For running an S3 service locally._ * Edit the `/etc/hosts` file on your system and make a reference for `127.0.0.1 s3.docker` -* Open the admin console `http://s3.docker:9090` and login. +* Open the admin console http://s3.docker:10001 and login. * username: root * password: password * Create an appropriate bucket for each project as needed. @@ -77,7 +77,7 @@ _For running an S3 service locally._ * `AWS_SECRET_ACCESS_KEY=password` * `AWS_DEFAULT_REGION=us-east-1` * `AWS_BUCKET=[project-bucket-name]` - * `AWS_ENDPOINT=http://s3.docker:9000` + * `AWS_ENDPOINT=http://s3.docker:10000` * `AWS_USE_PATH_STYLE_ENDPOINT=true` ---