Skip to content

Commit

Permalink
Merge pull request #1 from garutilorenzo/refactoring
Browse files Browse the repository at this point in the history
Refactoring
  • Loading branch information
garutilorenzo committed Jan 20, 2023
2 parents fff23e0 + c878ca0 commit 7b0be07
Show file tree
Hide file tree
Showing 54 changed files with 1,248 additions and 958 deletions.
54 changes: 0 additions & 54 deletions .docker-compose.yml-build

This file was deleted.

16 changes: 5 additions & 11 deletions .docker-compose.yml-ci
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,12 @@ services:

laravel:
container_name: laravel
image: localbuild/laravel-docker-ci:latest
build:
context: laravel/
args:
DOCKER_IMAGE_VERSION: 8.0-fpm
PDO: pdo_mysql
DB: mysql
image: localbuild/laravel-docker:php80
environment:
- MYSQL_USER=app
- MYSQL_PASSWORD=dev
- MYSQL_DATABASE=laravel
- LARAVEL_DB_HOST=mysql
- MYSQL_USER=${LARAVEL_DB_USER:-app}
- MYSQL_PASSWORD=${LARAVEL_DB_PASSWORD:-password}
- MYSQL_DATABASE=${LARAVEL_DB_NAME:-laravel}
- LARAVEL_DB_HOST=${LARAVEL_DB_HOST:-mysql}
- FORCE_MIGRATE=force
command: [ "php", "artisan", "serve", "--host=0.0.0.0", "--port=3000" ]
ports:
Expand Down
2 changes: 2 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*.tar.gz
laravel-project/
6 changes: 3 additions & 3 deletions .env
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
# laravel
LARAVEL_DB_NAME=laravel
LARAVEL_DB_HOST=mysql
LARAVEL_DB_USER=root
LARAVEL_DB_USER=app
LARAVEL_DB_PASSWORD=password

# mariadb
MARIADB_VERSION=latest
MYSQL_ROOT_PASSWORD=laravelAdmin
MYSQL_USER=app
MYSQL_PASSWORD=dev
MYSQL_PASSWORD=password
MYSQL_DATABASE=laravel

# nginx
NGINX_VERSION=latest

# volumes on host
NGINX_CONF_DIR=./config/nginx
NGINX_TEMPLATE_DIR=./config
LARAVEL_DATA_DIR=./laravel-project
SSL_CERTS_DIR=./certs
SSL_CERTS_DATA_DIR=./certs-data
20 changes: 15 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,20 @@ name: Laravel CI
on:
push:
branches:
- master
- master
paths:
- 'laravel/**'
- 'ubuntu/**'
- 'php-fpm/**'
- 'alpine/**'
pull_request:
branches:
- master
- master
paths:
- 'laravel/**'
- 'ubuntu/**'
- 'php-fpm/**'
- 'alpine/**'

jobs:

Expand All @@ -15,9 +25,9 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Build the Docker image
run: docker-compose -f .docker-compose.yml-ci build --pull --no-cache
run: docker-compose --env-file build-env-files/php-fpm/8/.env-mysql -f build-phpfpm.yml build --pull
- name: Bringup the environment
run: docker-compose -f .docker-compose.yml-ci --env-file .env up -d
- name: Sleep for 30 seconds
Expand All @@ -31,7 +41,7 @@ jobs:
- uses: anchore/scan-action@v2
id: scan
with:
image: "localbuild/laravel-docker-ci:latest"
image: "localbuild/laravel-docker:php80"
acs-report-enable: true
- name: upload Anchore scan SARIF report
uses: github/codeql-action/upload-sarif@v1
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
sql/
laravel-project/
Loading

0 comments on commit 7b0be07

Please sign in to comment.