Skip to content

Commit

Permalink
Merge branch 'master' into feature/extend-git-commands
Browse files Browse the repository at this point in the history
# Conflicts:
#	README.md
  • Loading branch information
charlesreffett committed Aug 19, 2024
2 parents 5b28a9d + c48098a commit f0058da
Show file tree
Hide file tree
Showing 7 changed files with 94 additions and 21 deletions.
1 change: 1 addition & 0 deletions .github/linters/.hadolint.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
ignored:
- DL3022
- DL3008
Expand Down
4 changes: 4 additions & 0 deletions .github/linters/.markdown-lint.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
# Hard wrap to 120, not 80
MD013:
line_length: 120
Expand All @@ -10,3 +11,6 @@ MD025: false

# Allow no new lines between lists (Changelog)
MD032: false

# Allow base-urls (http) for links (Readme)
MD034: false
4 changes: 2 additions & 2 deletions .github/workflows/linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Lint Code Base
uses: github/super-linter/slim@v4
uses: github/super-linter/slim@v5
env:
VALIDATE_ALL_CODEBASE: true
DEFAULT_BRANCH: master
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
.DS_Store
.idea
docker/data-source-tools/storage
docker/data-source-tools/storage/*

59 changes: 48 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,35 +16,71 @@ language and other tools it may need, as the databases and other services are
standardized in this project. Since most cloud providers provide managed versions
of these services, you likely would not use a docker version of them in production.

## Docker
# Docker

### Required: data source services
## Data Source Services

```bash
git clone git@github.com:sourcetoad/DevopsToolKit.git devop-tools
./devop-tools/docker/data-source-services/network-creation.sh
cd ./devop-tools/docker/data-source-services && docker-compose up --build -d
```

#### Specific Setup - Windows

### Windows
* 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.

### Optional: Data Source Tools
---

## Data Source Tools
* Optionally included is the following tools:
* phpMyAdmin
* `cd ./devop-tools/docker/data-source-tools && docker-compose up --build -d`
* phpMyAdmin
* Mailpit
* MinIO

## phpMyAdmin
```bash
cd ./devop-tools/docker/data-source-tools && docker-compose up --build -d
```

If the optional tools are launched, you can find phpMyAdmin at: localhost:8080
### phpMyAdmin
_For managing MySQL/MariaDB databases visually._

* Viewable at: http://localhost:8080
* It supports the following databases...
* mariadb106 (lts)
* mariadb1011 (lts)
* mariadb106 (lts)
* mariadb1011 (lts)

### Mailpit
_For mimicking an email inbox (ala mailtrap) for local usage._

* Viewable at: http://localhost:8025
* Configurable in projects via `.env`
* `MAIL_MAILER=smtp`
* `MAIL_HOST=sourcetoad_mailpit`
* `MAIL_PORT=1025`
* `MAIL_USERNAME=null`
* `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:10001 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:10000`
* `AWS_USE_PATH_STYLE_ENDPOINT=true`

---

## Scripts

Expand Down Expand Up @@ -109,6 +145,7 @@ git make-release --dry

## Docs

* [Hop](docs/hop/README.md)
* [Setting up Nginx-Proxy](docs/nginx-proxy/README.md)
* [Setting up PHP Testing in PhpStorm](docs/phpstorm-docker/README.md)
* [Leveraging Yii2 Shell](docs/yii2/yii-shell.md)
9 changes: 5 additions & 4 deletions docker/data-source-services/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
# Everything ahead of the last two digits are standard for the given service
#
# Network name is st-{service name}-{service MAJOR.MINOR}
---
version: '3.8'
services:
nginxproxy:
Expand All @@ -15,7 +16,7 @@ services:
- /var/run/docker.sock:/tmp/docker.sock:ro
- ./proxy_increase.conf:/etc/nginx/proxy.conf
networks:
- st-internal
- st-internal
mariadb1011:
image: mariadb:10.11
container_name: sourcetoad_mariadb1011
Expand All @@ -39,6 +40,6 @@ services:
networks:
- st-internal
networks:
st-internal:
external: true
name: st-internal
st-internal:
external: true
name: st-internal
36 changes: 32 additions & 4 deletions docker/data-source-tools/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,33 @@
---
version: '3.8'
services:
mailpit:
image: axllent/mailpit:latest
container_name: sourcetoad_mailpit
ports:
- "8025:8025"
- "1025:1025"
networks:
- st-internal
environment:
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:
- "10000:10000"
- "10001:10001"
volumes:
- ./storage/data:/data
environment:
- MINIO_ROOT_USER=root
- MINIO_ROOT_PASSWORD=password
command: server /data/ --address :10000 --console-address :10001
networks:
- st-internal
phpmyadmin:
image: phpmyadmin/phpmyadmin:latest
container_name: sourcetoad_phpmyadmin
Expand All @@ -8,10 +36,10 @@ services:
networks:
- st-internal
environment:
PMA_HOSTS: mariadb106,mariadb1011
PMA_HOSTS: mariadb1011,mariadb106
PMA_USER: root
PMA_PASSWORD: root
networks:
st-internal:
external: true
name: st-internal
st-internal:
external: true
name: st-internal

0 comments on commit f0058da

Please sign in to comment.