feat(docker): refactor to use pre-built images

- Add build/load script for image management
- Use .env config for image naming and PHP version
- Switch to www-data user in Dockerfile
- Update compose.yaml to use pre-built images
- Add .dockerignore
- Simplify entrypoint script
This commit is contained in:
2025-12-10 02:57:17 +03:00
parent 8795c78230
commit 49b7d83dfa
8 changed files with 103 additions and 61 deletions

View File

@@ -5,7 +5,9 @@
## Создание проекта:
```bash
touch .env
cp .env.example .env
# !change .env for yourself
./run.sh build
docker compose up -d php-fpm
docker compose exec php-fpm bash
```
@@ -20,15 +22,3 @@ laravel new example-app
mv example-app/* example-app/.* ./
rmdir example-app
```
Изменить в `.env`
```
DB_CONNECTION=mysql
DB_HOST=mysql
DB_PORT=3306
DB_DATABASE=app
DB_USERNAME=laravel
DB_PASSWORD=secret
DB_ROOT_PASSWORD=secret
```