Skip to content

Instantly share code, notes, and snippets.

@ctrlaltdylan
Last active November 13, 2018 05:23
Show Gist options
  • Save ctrlaltdylan/557c5ea786aaf57630f4aecb8075a515 to your computer and use it in GitHub Desktop.
Save ctrlaltdylan/557c5ea786aaf57630f4aecb8075a515 to your computer and use it in GitHub Desktop.
Simple Laravel Container
version: '2'
services:
laravel:
image: php:latest
expose:
- '80'
- '443'
volumes:
- .:/home
depends_on:
- db
entrypoint: /home
command: php artisan serve
db:
image: mysql:latest
expose:
- '3601'
variables:
- MYSQL_ADMIN_PASSWORD=root
- MYSQL_ADMIN_USERNAME=root
@ctrlaltdylan
Copy link
Author

Start the container with
docker-compose up

Start an individual service up with:
docker-compose up laravel

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment