Skip to content

Commit 7b0be07

Browse files
Merge pull request #1 from garutilorenzo/refactoring
Refactoring
2 parents fff23e0 + c878ca0 commit 7b0be07

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+1248
-958
lines changed

.docker-compose.yml-build

Lines changed: 0 additions & 54 deletions
This file was deleted.

.docker-compose.yml-ci

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,12 @@ services:
33

44
laravel:
55
container_name: laravel
6-
image: localbuild/laravel-docker-ci:latest
7-
build:
8-
context: laravel/
9-
args:
10-
DOCKER_IMAGE_VERSION: 8.0-fpm
11-
PDO: pdo_mysql
12-
DB: mysql
6+
image: localbuild/laravel-docker:php80
137
environment:
14-
- MYSQL_USER=app
15-
- MYSQL_PASSWORD=dev
16-
- MYSQL_DATABASE=laravel
17-
- LARAVEL_DB_HOST=mysql
8+
- MYSQL_USER=${LARAVEL_DB_USER:-app}
9+
- MYSQL_PASSWORD=${LARAVEL_DB_PASSWORD:-password}
10+
- MYSQL_DATABASE=${LARAVEL_DB_NAME:-laravel}
11+
- LARAVEL_DB_HOST=${LARAVEL_DB_HOST:-mysql}
1812
- FORCE_MIGRATE=force
1913
command: [ "php", "artisan", "serve", "--host=0.0.0.0", "--port=3000" ]
2014
ports:

.dockerignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
*.tar.gz
2+
laravel-project/

.env

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
11
# laravel
22
LARAVEL_DB_NAME=laravel
33
LARAVEL_DB_HOST=mysql
4-
LARAVEL_DB_USER=root
4+
LARAVEL_DB_USER=app
55
LARAVEL_DB_PASSWORD=password
66

77
# mariadb
88
MARIADB_VERSION=latest
99
MYSQL_ROOT_PASSWORD=laravelAdmin
1010
MYSQL_USER=app
11-
MYSQL_PASSWORD=dev
11+
MYSQL_PASSWORD=password
1212
MYSQL_DATABASE=laravel
1313

1414
# nginx
1515
NGINX_VERSION=latest
1616

1717
# volumes on host
18-
NGINX_CONF_DIR=./config/nginx
18+
NGINX_TEMPLATE_DIR=./config
1919
LARAVEL_DATA_DIR=./laravel-project
2020
SSL_CERTS_DIR=./certs
2121
SSL_CERTS_DATA_DIR=./certs-data

.github/workflows/ci.yml

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,20 @@ name: Laravel CI
33
on:
44
push:
55
branches:
6-
- master
6+
- master
7+
paths:
8+
- 'laravel/**'
9+
- 'ubuntu/**'
10+
- 'php-fpm/**'
11+
- 'alpine/**'
712
pull_request:
813
branches:
9-
- master
14+
- master
15+
paths:
16+
- 'laravel/**'
17+
- 'ubuntu/**'
18+
- 'php-fpm/**'
19+
- 'alpine/**'
1020

1121
jobs:
1222

@@ -15,9 +25,9 @@ jobs:
1525
runs-on: ubuntu-latest
1626

1727
steps:
18-
- uses: actions/checkout@v2
28+
- uses: actions/checkout@v3
1929
- name: Build the Docker image
20-
run: docker-compose -f .docker-compose.yml-ci build --pull --no-cache
30+
run: docker-compose --env-file build-env-files/php-fpm/8/.env-mysql -f build-phpfpm.yml build --pull
2131
- name: Bringup the environment
2232
run: docker-compose -f .docker-compose.yml-ci --env-file .env up -d
2333
- name: Sleep for 30 seconds
@@ -31,7 +41,7 @@ jobs:
3141
- uses: anchore/scan-action@v2
3242
id: scan
3343
with:
34-
image: "localbuild/laravel-docker-ci:latest"
44+
image: "localbuild/laravel-docker:php80"
3545
acs-report-enable: true
3646
- name: upload Anchore scan SARIF report
3747
uses: github/codeql-action/upload-sarif@v1

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
sql/
2+
laravel-project/

0 commit comments

Comments
 (0)