Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/toa-anakin/lumen-docker-dev
Docker setup for Lumen with Nginx and PHP 8.2
https://github.com/toa-anakin/lumen-docker-dev
docker laravel-lumen lumen lumen-framework lumen-micro-framework lumen-php-framework nginx php82
Last synced: about 2 months ago
JSON representation
Docker setup for Lumen with Nginx and PHP 8.2
- Host: GitHub
- URL: https://github.com/toa-anakin/lumen-docker-dev
- Owner: TOA-Anakin
- License: mit
- Created: 2023-12-02T02:01:48.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2023-12-02T05:04:45.000Z (about 1 year ago)
- Last Synced: 2024-10-12T13:01:17.025Z (3 months ago)
- Topics: docker, laravel-lumen, lumen, lumen-framework, lumen-micro-framework, lumen-php-framework, nginx, php82
- Language: Dockerfile
- Homepage:
- Size: 2.93 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Docker Setup for Laravel/Lumen projects
## Local dev guide (Linux)
1. Clone the repo:
```.sh
git clone https://github.com/TOA-Anakin/lumen-docker-dev.git
```
2. Rename the cloned repo as desired:
```.sh
mv lumen-docker-dev your_project_name
```
3. Check your user ID using the `id -u` command and update the `.docker/.env` file accordingly.
4. `cd` into the `.docker` directory and build the Docker containers:
```.sh
cd your_project_name/.docker
docker compose up -d --build
```
Before the end of the process you should see a list of newly created (now running) containers:
```.sh
[+] Running 2/2
✔ Network lumen_docker_app Created 0.1s
✔ Container lumen_docker-api-1 Started 0.1s
```
5. Open the terminal of the PHP container (mine is named `lumen_docker-php-1`) and create a Lumen project using `composer`:
```.sh
docker exec -it lumen_docker-php-1 bash
composer create-project --prefer-dist laravel/lumen tmpdir
```
Move the contents of `temp_dir` into the project root:
```.sh
mv tmpdir/* . && mv tmpdir/.[!.]* . && rmdir tmpdir
```
6. Access your Lumen web app at http://localhost