$ docker compose -f docker-compose.dev.yml up -d --force-recreate --build
$ docker exec -i local /bin/bash -c '/usr/local/bin/php artisan config:clear'
$ docker exec -i local /bin/bash -c '/usr/local/bin/php artisan cache:clear'
$ docker exec -i local /bin/bash -c '/usr/local/bin/php artisan view:clear'
$ docker exec -i local /bin/bash -c '/usr/local/bin/php artisan DBConnection'
$ docker exec -i local /bin/bash -c '/usr/local/bin/php artisan migrate'
$ docker exec -i local /bin/bash -c '/usr/local/bin/php artisan test'
$ docker exec -i local /bin/bash -c './vendor/bin/phpstan analyse --memory-limit=2G'
Check Jenkins folder for how to setup Jenkins for this project, as this pipeline rely on the fact Docker/Docker Compose will available on Jenkins Node. For that DIND (Docker inside Docker) pattern was used with help of sysbox
.
- Dashboard > Manage Jenkins > Credentials > System > Global credentials (unrestricted)
Name | Kind | Description |
---|---|---|
repo_image | Secret text | repository/image |
REMOTE_HOST | Secret text | Remote server IP Address |
REMOTE_USER | Secret text | Remote server user name |
DockerHub | Username with password | Create credentials of DockerHub (UserName & Personal access token) |
SSH | SSH Private Key | SSH Username with private key |
known_hosts | Secret file | Known Host Fingerprint |
- How to get known_hosts data
- ssh-keyscan -H [REMOTE_HOST] >> known_hosts
- paste the content on
known_hosts
Secret file
laravel blog web application written in
laravel v.9
by following TDD software deplovment with Jenkins CI/CD pipeline which also inclue deployment to remote server
we have these user types
# | User TYpe | Description |
---|---|---|
1 | admin |
admin can define a writer |
2 | writer |
writer can write posts |
3 | user |
user can see posts |
- Define
new Writer
See
Each Writer Posts- Define
New Category
See
All Category
- Write Posts
- Define
Tags
for a Post - See Post Comments
- Able to approve comments to show them under a post
TODO
Able to Reply Comment
- Able to See Posts
- Write Comments
Here is Blog Database Schema
list of TDD
- Test for
Admin
abilities - Test for
Writer
abilities - Test for
User
abilities - Test for
Guest
User - Test for
Authentication