Skip to content

Instantly share code, notes, and snippets.

@aimakun
Last active April 19, 2018 09:01
Show Gist options
  • Save aimakun/8419b4a132643b5ef3e7e531a95597db to your computer and use it in GitHub Desktop.
Save aimakun/8419b4a132643b5ef3e7e531a95597db to your computer and use it in GitHub Desktop.
Docker compose file for laravel 5+
version: '3'
services:
db:
image: mariadb:10.3
volumes:
- db-data:/var/lib/mysql
ports:
- "3306:3306"
environment:
MYSQL_DATABASE: projectname
MYSQL_ROOT_PASSWORD: password
web:
image: choqco/dk-laravel:php72
ports:
- "80:80"
volumes:
- .:/data
links:
- db
environment:
MYSQL_HOST: db
APP_URL: http://172.17.0.1
dbadmin:
image: phpmyadmin/phpmyadmin:4.7
ports:
- "8183:80"
links:
- db
volumes:
db-data:
version: '3'
services:
db:
image: mariadb:10.3
volumes:
- db-data:/var/lib/mysql
ports:
- "3306"
environment:
MYSQL_DATABASE: projectname
MYSQL_ROOT_PASSWORD: password
web:
image: choqco/dk-laravel:php72
ports:
- "80"
volumes:
- .:/data
links:
- db
environment:
MYSQL_HOST: db
APP_URL: http://172.17.0.1
VIRTUAL_HOST: projectname.example
dbadmin:
image: phpmyadmin/phpmyadmin:4.7
ports:
- "80"
links:
- db
volumes:
db-data:
networks:
default:
external:
name: project_network
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment