Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"dockerComposeFile": [
"../docker-compose-73.yml"
"../docker-compose-83.yml"
],
"service": "app",
"workspaceFolder": "/src/",
"workspaceFolder": "/src/"
}
24 changes: 5 additions & 19 deletions .github/workflows/docker-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@ jobs:
test:
strategy:
matrix:
PHP: [73, 74, 80, 81, 82, 83]
PHP: [74, 80, 81, 82, 83, 84, 85]

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v6

- name: Prepare code
run: |
Expand All @@ -34,7 +34,7 @@ jobs:
env:
PHP_VERSION: ${{ matrix.PHP }}
run: |
docker-compose -f docker-compose-${PHP_VERSION}.yml up --build -d
docker compose -f docker-compose-${PHP_VERSION}.yml up --build -d

- name: Wait enviroment
env:
Expand All @@ -50,20 +50,6 @@ jobs:
run: |
docker ps -a
docker logs php-dev_app

- name: Run tests -> PHP Stan
if: matrix.PHP != '56'
env:
PHP_VERSION: ${{ matrix.PHP }}
run: |
docker-compose -f docker-compose-${PHP_VERSION}.yml exec -T -w /var/www/ app phpstan

# - name: Run tests -> PHP CS Fixer
# if: matrix.PHP != '56'
# env:
# PHP_VERSION: ${{ matrix.PHP }}
# run: |
# docker-compose -f docker-compose-${PHP_VERSION}.yml exec -T -w /var/www/ app php-cs-fixer fix

- name: Run tests -> Http Request
env:
Expand All @@ -82,13 +68,13 @@ jobs:

strategy:
matrix:
PHP: [73, 74, 80, 81, 82, 83]
PHP: [74, 80, 81, 82, 83, 84, 85]

runs-on: ubuntu-latest
if: github.event_name == 'push'

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v6

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ RUN echo "memory_limit=-1" > $PHP_GLOBAL_CONFIG_PATH/99_memory-limit.ini
RUN pecl install pcov

# Install Oh My Zsh
RUN apt-get update && apt-get install -y procps vim
RUN apt-get update && apt-get install -y procps vim wget
RUN sh -c "$(wget -O- https://github.com/deluan/zsh-in-docker/releases/download/v1.1.1/zsh-in-docker.sh)" -- \
-t https://github.com/denysdovhan/spaceship-prompt \
-a 'SPACESHIP_PROMPT_ADD_NEWLINE="false"' \
Expand Down
28 changes: 0 additions & 28 deletions Dockerfile-56

This file was deleted.

5 changes: 2 additions & 3 deletions docker-compose-74.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
version: '3.5'
networks:
php-dev:
name: php-dev
Expand Down Expand Up @@ -28,7 +27,7 @@ services:
- CODECOMMIT_USER=$CODECOMMIT_USER
- CODECOMMIT_PASSWORD=$CODECOMMIT_PASSWORD
volumes:
- ./www73/:/var/www/
- ./www74/:/var/www/
networks:
- php-dev
links:
Expand Down Expand Up @@ -57,7 +56,7 @@ services:
ports:
- 80:80
volumes:
- ./www73/:/var/www/
- ./www74/:/var/www/
links:
- app
depends_on:
Expand Down
1 change: 0 additions & 1 deletion docker-compose-80.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
version: '3.5'
networks:
php-dev:
name: php-dev
Expand Down
1 change: 0 additions & 1 deletion docker-compose-81.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
version: '3.5'
networks:
php-dev:
name: php-dev
Expand Down
1 change: 0 additions & 1 deletion docker-compose-82.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
version: '3.5'
networks:
php-dev:
name: php-dev
Expand Down
1 change: 0 additions & 1 deletion docker-compose-83.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
version: '3.5'
networks:
php-dev:
name: php-dev
Expand Down
10 changes: 4 additions & 6 deletions docker-compose-73.yml → docker-compose-84.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
version: '3.5'
networks:
php-dev:
name: php-dev
Expand All @@ -11,8 +10,8 @@ services:
context: .
dockerfile: Dockerfile
args:
- PHP_VERSION=73
image: likesistemas/php-dev:73-dev
- PHP_VERSION=84
image: likesistemas/php-dev:84-dev
container_name: php-dev_app
environment:
- PHP_NAME=lemp
Expand All @@ -28,8 +27,7 @@ services:
- CODECOMMIT_USER=$CODECOMMIT_USER
- CODECOMMIT_PASSWORD=$CODECOMMIT_PASSWORD
volumes:
- ./www73/:/var/www/
- ./:/src/
- ./www80/:/var/www/
networks:
- php-dev
links:
Expand Down Expand Up @@ -58,7 +56,7 @@ services:
ports:
- 80:80
volumes:
- ./www73/:/var/www/
- ./www80/:/var/www/
links:
- app
depends_on:
Expand Down
17 changes: 9 additions & 8 deletions docker-compose-56.yml → docker-compose-85.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
version: '3.5'
networks:
php-dev:
name: php-dev-56
name: php-dev
driver: bridge

services:

app:
build:
context: .
dockerfile: Dockerfile-56
image: likesistemas/php-dev:56-dev
dockerfile: Dockerfile
args:
- PHP_VERSION=85
image: likesistemas/php-dev:85-dev
container_name: php-dev_app
environment:
- PHP_NAME=lemp
Expand All @@ -26,7 +27,7 @@ services:
- CODECOMMIT_USER=$CODECOMMIT_USER
- CODECOMMIT_PASSWORD=$CODECOMMIT_PASSWORD
volumes:
- ./www56/:/var/www/
- ./www80/:/var/www/
networks:
- php-dev
links:
Expand All @@ -38,7 +39,7 @@ services:
image: mysql:5.5
command: --innodb-use-native-aio=0
volumes:
- php56-dev-mysql-data:/var/lib/mysql
- php-dev-mysql-data:/var/lib/mysql
environment:
- MYSQL_ROOT_PASSWORD=123456
- MYSQL_DATABASE=php
Expand All @@ -55,7 +56,7 @@ services:
ports:
- 80:80
volumes:
- ./www56/:/var/www/
- ./www80/:/var/www/
links:
- app
depends_on:
Expand All @@ -64,4 +65,4 @@ services:
- php-dev

volumes:
php56-dev-mysql-data:
php-dev-mysql-data:
6 changes: 3 additions & 3 deletions k6/README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# K6.io

Para rodar os testes iniciar o PHP usando o docker-compose da versão escolhida e executar o k6 como o exemplo abaixo usando o PHP 7.3.
Para rodar os testes iniciar o PHP usando o docker compose da versão escolhida e executar o k6 como o exemplo abaixo usando o PHP 7.3.

```shell
docker-compose -f docker-compose-73.yml up --build -d
k6 run -e PHP_VERSION=73 --vus 40 --duration 30s index.js
docker compose -f docker-compose-83.yml up --build -d
k6 run -e PHP_VERSION=83 --vus 40 --duration 30s index.js
```

Neste exemplo ele irá rodar com 40 conexões simultaneas por 30 segundos.
Expand Down
2 changes: 1 addition & 1 deletion k6/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { Counter } from 'k6/metrics';
export const requests = new Counter('http_reqs');

export const urlbase = __ENV.URL != null ? __ENV.URL : "http://127.0.0.1/";
export const phpVersion = __ENV.PHP_VERSION != null ? __ENV.PHP_VERSION : "73";
export const phpVersion = __ENV.PHP_VERSION != null ? __ENV.PHP_VERSION : "83";

export const options = {
thresholds: {
Expand Down
23 changes: 0 additions & 23 deletions www56/composer.json

This file was deleted.

Loading