Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/reyesoft/laravel-docker-standalone
https://github.com/reyesoft/laravel-docker-standalone
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/reyesoft/laravel-docker-standalone
- Owner: reyesoft
- License: mit
- Created: 2024-02-27T12:18:03.000Z (10 months ago)
- Default Branch: main
- Last Pushed: 2024-02-27T15:13:04.000Z (10 months ago)
- Last Synced: 2024-02-28T15:50:42.004Z (10 months ago)
- Language: PHP
- Size: 80.1 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# laravel-docker-standalone
## Local workspace
### Starting
````bash
docker network create laravel-networkdocker volume create --name mariadb_data
docker run -d --name mariadb \
--env ALLOW_EMPTY_PASSWORD=yes \
--env MARIADB_USER=bn_myapp \
--env MARIADB_DATABASE=bitnami_myapp \
--network laravel-network \
--volume mariadb_data:/bitnami/mariadb \
bitnami/mariadb:latestdocker build -t laravel .
docker run -it \
--name laravel \
-p 8000:8000 \
--env DB_HOST=mariadb \
--env DB_PORT=3306 \
--env DB_USERNAME=bn_myapp \
--env DB_DATABASE=bitnami_myapp \
--network laravel-network \
--volume ${PWD}/project:/app \
laravel
````### Access to app bash
````bash
docker exec -it laravel bash
````If you like to run simultaneously the app and the bash, you need two terminals;
or run the app in background with `docker run -d ...` and then run the bash with `docker exec -it laravel bash`.## Extending the image
1. Create a new `Dockerfile` in your project with `FROM bitnami/laravel:latest`.
2. Run `docker build -t laravel .` to build the new image.
3. Run `docker run ...` replacing bitnami image by just `laravel`.## Develop
**Q: How to upgrade laravel app on this repository?**
**A:** Just remove `project` folder and re-run `docker run -it ...` again.