Skip to content

Commit 2cc0b20

Browse files
authored
Laravel 10 follow-up (#650)
* Add missing `unzip` * Fix `does not comply with psr-4 autoloading standard` * Update `composer.locl` * More `psr-4` autoload * Add health check to fix race-condition between local containers * Fix `yamllint`
1 parent 61bb9ec commit 2cc0b20

11 files changed

+336
-580
lines changed

docker-compose-dockerhub.yml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,12 @@ services:
1515
ports:
1616
- 8000:80
1717
- 8443:443
18+
healthcheck:
19+
test: [CMD, curl, -f, http://localhost/up]
20+
start_period: 60s
21+
interval: 30s
22+
timeout: 10s
23+
retries: 100
1824

1925
frontend:
2026
container_name: frontend
@@ -35,12 +41,11 @@ services:
3541
condition: service_healthy
3642
redis:
3743
condition: service_started
44+
backend:
45+
condition: service_healthy
3846
links:
3947
- mysql:db
4048
- redis:redis
41-
volumes:
42-
- ./docker/config/php/php.ini:/usr/local/etc/php/php.ini
43-
- ./src/backend:/var/www/html
4449

4550
worker:
4651
container_name: worker

docker-compose-prod.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,12 @@ services:
1616
ports:
1717
- 8000:80
1818
- 8443:443
19+
healthcheck:
20+
test: [CMD, curl, -f, http://localhost/up]
21+
start_period: 60s
22+
interval: 30s
23+
timeout: 10s
24+
retries: 100
1925

2026
frontend-prod:
2127
container_name: frontend-prod
@@ -38,6 +44,8 @@ services:
3844
condition: service_healthy
3945
redis:
4046
condition: service_started
47+
backend-prod:
48+
condition: service_healthy
4149
links:
4250
- mysql:db
4351
- redis:redis

docker-compose.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,12 @@ services:
1818
- 8443:443
1919
volumes:
2020
- ./src/backend:/var/www/html
21+
healthcheck:
22+
test: [CMD, curl, -f, http://localhost/up]
23+
start_period: 60s
24+
interval: 30s
25+
timeout: 10s
26+
retries: 100
2127

2228
frontend-dev:
2329
container_name: frontend-dev
@@ -41,6 +47,8 @@ services:
4147
condition: service_healthy
4248
redis:
4349
condition: service_started
50+
backend-dev:
51+
condition: service_healthy
4452
links:
4553
- mysql:db
4654
- redis:redis

docker/DockerfileBackendDev

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ RUN apt-get update && apt-get install -y \
88
libssl-dev \
99
libxml2-dev \
1010
libzip-dev \
11+
unzip \
1112
zlib1g-dev
1213

1314
# remove apt lists

docker/DockerfileBackendProd

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ RUN apt-get update && apt-get install -y \
88
libssl-dev \
99
libxml2-dev \
1010
libzip-dev \
11+
unzip \
1112
zlib1g-dev
1213

1314
# remove apt lists

docker/DockerfileSchedulerDev

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ RUN apt-get update && apt-get install -y \
88
libssl-dev \
99
libxml2-dev \
1010
libzip-dev \
11+
unzip \
1112
zlib1g-dev
1213

1314
# install container specific apt packages

docker/DockerfileSchedulerProd

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ RUN apt-get update && apt-get install -y \
88
libssl-dev \
99
libxml2-dev \
1010
libzip-dev \
11+
unzip \
1112
zlib1g-dev
1213

1314
# install container specific apt packages
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?php
22

3-
namespace App\Exceptions\Meter;
3+
namespace App\Exceptions\Meters;
44

55
class MeterNotFound extends \Exception {}

src/backend/app/Misc/LoanDataContainer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22

33
namespace App\Misc;
44

5-
use App\Exceptions\Meter\MeterNotFound;
65
use App\Exceptions\Meters\MeterIsNotAssignedToCustomer;
76
use App\Exceptions\Meters\MeterIsNotInUse;
7+
use App\Exceptions\Meters\MeterNotFound;
88
use App\Models\AssetPerson;
99
use App\Models\AssetRate;
1010
use App\Models\Meter\Meter;

0 commit comments

Comments
 (0)