-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
049f6da
commit 98a8181
Showing
23 changed files
with
1,646 additions
and
75 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,15 @@ | ||
# PHP_2023 | ||
|
||
https://otus.ru/lessons/razrabotchik-php/?utm_source=github&utm_medium=free&utm_campaign=otus | ||
|
||
### Init Docker App | ||
- cd ./docker | ||
- copy .env.example .env | ||
- Set the environment for .env | ||
- Build Image: docker-compose up --build -d | ||
|
||
|
||
### Init Homestead | ||
- cd ./homestead | ||
- Read: **[Homestead](https://laravel.com/docs/10.x/homestead)** | ||
### Init Docker | ||
```bash | ||
cd app | ||
docker-compose up --build -d | ||
docker exec -it php-server bash | ||
composer install | ||
exit; | ||
``` | ||
|
||
- Add **mysite.local** in /etc/hosts | ||
|
||
### Test | ||
```bash | ||
curl -d "[email protected],[email protected]" -X POST http://mysite.local | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
.env | ||
nginx/logs/* | ||
vendor |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
version: '3.3' | ||
|
||
services: | ||
nginx: | ||
image: nginx:latest | ||
ports: | ||
- "80:80" | ||
volumes: | ||
- ./nginx/conf:/etc/nginx/conf.d | ||
- ./nginx/logs:/var/log/nginx | ||
- ./www:/var/www | ||
links: | ||
- php | ||
|
||
php: | ||
build: ./php | ||
container_name: php-server | ||
hostname: php-server | ||
volumes: | ||
- ./www:/var/www | ||
|
4 changes: 2 additions & 2 deletions
4
docker/nginx/conf/application.local.conf → app/nginx/conf/mysite.local.conf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
{ | ||
"name": "root/www", | ||
"type": "project", | ||
"autoload": { | ||
"psr-4": { | ||
"Root\\Www\\": "src/" | ||
} | ||
}, | ||
"authors": [ | ||
{ | ||
"name": "MT" | ||
} | ||
], | ||
"require": { | ||
"slim/slim": "4.*", | ||
"slim/psr7": "^1.6", | ||
"nyholm/psr7": "^1.8", | ||
"nyholm/psr7-server": "^1.0", | ||
"guzzlehttp/psr7": "^2", | ||
"laminas/laminas-diactoros": "^3.2", | ||
"php-di/php-di": "^7.0", | ||
"selective/basepath": "^2.2" | ||
} | ||
} |
Oops, something went wrong.