Skip to content
Closed
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
21 changes: 21 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
FROM php:8.3-cli

RUN apt-get update && apt-get install -y \
libcurl4-openssl-dev \
libxml2-dev \
libonig-dev \
unzip \
git \
&& docker-php-ext-install curl xml mbstring \
&& rm -rf /var/lib/apt/lists/*

COPY --from=composer:2 /usr/bin/composer /usr/bin/composer

WORKDIR /app

COPY . .
RUN composer update --no-interaction

EXPOSE 8000

CMD ["php", "-S", "0.0.0.0:8000", "src/index.php"]
20 changes: 15 additions & 5 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,33 @@
"description": "Desafio para candidatos a back-end.",
"type": "project",
"require": {
"php": ">= 7.4"
"php": ">= 8.1"
},
"require-dev": {
"squizlabs/php_codesniffer": "^3.4",
"codeception/codeception": "^4.1",
"codeception/module-phpbrowser": "^1.0.0",
"codeception/module-rest": "^1.0.0"
"codeception/codeception": "^5.0",
"codeception/module-phpbrowser": "^3.0",
"codeception/module-rest": "^3.0",
"phpstan/phpstan": "^2.1",
"phpunit/phpunit": "^12.5"
},
"license": "MIT",
"scripts": {
"test": "./vendor/bin/codecept run",
"lint": "./vendor/bin/phpcs src/",
"lint:fix": "./vendor/bin/phpcbf src/"
"lint:fix": "./vendor/bin/phpcbf src/",
"unit-test": "./vendor/bin/phpunit",
"analyse": "./vendor/bin/phpstan analyse src/ --level=9"
},
"autoload": {
"psr-4": {
"App\\": "src/"
}
},
"autoload-dev": {
"psr-4": {
"Tests\\": "tests/",
"Tests\\Unit\\": "tests-unit/"
}
}
}
Loading