|
| 1 | +# 🚀 Laravel on AWS ECS starter kit |
| 2 | + |
| 3 | +## What's this ? |
| 4 | +- Laravel + AWS ECS 構成でコンテナネイティブな Webアプリケーションを実装する際のスターターキットです。 |
| 5 | +- ローカル開発環境とAWS本番環境で全く同じDockerfileを使用するため、環境差による問題の発生を抑えることができます。 |
| 6 | +- Dev Container を採用しており、開発者毎の環境差も無くなります。 |
| 7 | +- AWS SQS 互換の ElasticMQ の Dockerimage を採用しており、ローカル環境でエミュレート可能です。 |
| 8 | + |
| 9 | +## Required Middleware |
| 10 | +| Middleware | Version | |
| 11 | +| ---------------: | :---------------- | |
| 12 | +| `Docker` | 27.1.x or higher | |
| 13 | +| `Docker Compose` | v2.29.x or higher | |
| 14 | + |
| 15 | + |
| 16 | +## Summary |
| 17 | +| Service | Version | |
| 18 | +| --------: | :------ | |
| 19 | +| `PHP` | 8.3.x | |
| 20 | +| `Laravel` | 11.x | |
| 21 | + |
| 22 | +## Directory Structure |
| 23 | +| Service | Role | Detail | |
| 24 | +| --------------: | :------------------------------ | :----------------------------------------------------------------------------------- | |
| 25 | +| `.devcontainer` | Dev Container configurations | 開発コンテナの設定ファイル/Dockerfileなど | |
| 26 | +| `.vscode` | VSCode configurations | VSCodeの設定ファイルなど | |
| 27 | +| `deploy` | Deployment for AWS Environment | AWS運用環境に関するファイルなど<br> (e.x. CodePipeline, ECS Task definenation, etc.) | |
| 28 | +| `docker` | Docker files | ローカル環境・運用環境において共通のDockerファイル | |
| 29 | +| `src` | Laravel Application Source Code | Laravel のソースコード | |
| 30 | + |
| 31 | +## Docker Compose files |
| 32 | + |
| 33 | +### [`compose.development.api.yaml`](./compose.development.api.yaml) |
| 34 | +| Service | Role | Browser | |
| 35 | +| ------: | :--------- | :-------------------- | |
| 36 | +| `web` | Web Server | http://localhost:8000 | |
| 37 | +| `app` | Web API | | |
| 38 | + |
| 39 | +### [`compose.development.batch.yaml`](./compose.development.batch.yaml) |
| 40 | +| Service | Role | Browser | |
| 41 | +| ---------------------: | :----------------------- | :------ | |
| 42 | +| `example-emails-batch` | CLI App for sending mail | | |
| 43 | + |
| 44 | +### [`compose.development.infra.yaml`](./compose.development.infra.yaml) |
| 45 | +| Service | Role | Browser | |
| 46 | +| ----------: | :------------------ | :-------------------- | |
| 47 | +| `db` | Relational Database | | |
| 48 | +| `nosql` | NoSQL Database | | |
| 49 | +| `elasticmq` | Queuing | http://localhost:9325 | |
| 50 | +| `mail` | Mail | http://localhost:8025 | |
| 51 | + |
| 52 | + |
| 53 | +### [`compose.development.worker.yaml`](./compose.development.worker.yaml) |
| 54 | +| Service | Role | Browser | |
| 55 | +| ----------------------: | :--------------------------------- | :------------------------------------ | |
| 56 | +| `example-emails-worker` | Background Worker for sending mail | http://localhost:8000/api/send-emails | |
| 57 | + |
| 58 | +### [`compose.production.yaml`](./compose.production.yaml) |
| 59 | +| Service | Role | Browser | |
| 60 | +| ------------: | :-------------- | :-------------------- | |
| 61 | +| `web` | Web Server | http://localhost:8000 | |
| 62 | +| `app` | Web API | | |
| 63 | +| `app-builder` | Web API Builder | | |
| 64 | + |
| 65 | + |
0 commit comments