8000 Update readme. · jarnovanleeuwen/laravel-dock@0b04fcd · GitHub
[go: up one dir, main page]

Skip to content

Commit 0b04fcd

Browse files
Update readme.
1 parent 341e461 commit 0b04fcd

File tree

1 file changed

+18
-6
lines changed

1 file changed

+18
-6
lines changed

README.md

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,17 @@
1+
[![pipeline status](https://gitlab.com/jarnovanleeuwen/laravel-dock/badges/master/pipeline.svg)](https://gitlab.com/jarnovanleeuwen/laravel-dock/pipelines)
2+
13
Learning the concepts of [Docker](https://www.docker.com/), I created an example Laravel application using Docker's best architectural and security practices. The boilerplate code in this repository provides:
24

35
- Best practices on security (not running as root, no passwordless databases, no unnecessary file permissions).
46
- Using official Apache, PHP 7.2, MySQL 5.7 and Redis 5.0 images.
57
- A single code base for **development and production environments**.
68
- A single `.env` configuration file.
79
- A slim `Dockerfile` using only **official images**.
10+
- Tests structured for your CI/CD pipeline.
811
- A convenient binary providing `up`, `artisan`, `build`, `push`, and even `deploy` commands.
912
- Deployments to a multi-server cloud environment using **Docker Swarm**.
1013
- Built-in support for Laravel's key concepts: **scheduling, queues, cache etc.**
14+
- Built-in Laravel Horizon for managing queue workers through configuration.
1115
- All configuration in source control (e.g. virtual hosts, OPcache, InnoDB parameters).
1216

1317
# Installation
@@ -67,10 +71,18 @@ ufw allow 4789/udp
6771
ufw reload
6872
```
6973

70-
# To-do
74+
# CI/CD
75+
The `sut` service in `docker-compose.test.yml` can be used for automated testing. I have experimented with automated builds and tests on [Docker Hub](https://hub.docker.com/) and [GitLab.com](https://about.gitlab.com/product/continuous-integration/)'s CI/CD pipelines.
76+
77+
## DockerHub
78+
In the *Automated builds* configuration section, make sure to set the *Dockerfile location* to `build/Dockerfile` in your build rules.
79+
80+
## GitLab.com
81+
The build, test and release CI/CD pipeline stages are defined in `.gitlab-ci.yml`.
7182

72-
- Integrate Laravel Horizon.
73-
- Automated tests.
74-
- Automated builds.
75-
- Automated deployments.
76-
- Let's Encrypt support.
83+
## Other
84+
To 1) start the required services (i.e. MySQL), 2) wait for them to be ready, 3) run the database migrations and 4) run `phpunit`:
85+
86+
```bash
87+
docker-compose -f build/docker-compose.test.yml run sut
88+
```

0 commit comments

Comments
 (0)
0