Skip to content

Instantly share code, notes, and snippets.

@chrisk8er
Created October 27, 2018 08:32
Show Gist options
  • Save chrisk8er/a632be894f6f72233195a23ceb0b511f to your computer and use it in GitHub Desktop.
Save chrisk8er/a632be894f6f72233195a23ceb0b511f to your computer and use it in GitHub Desktop.
version: '2'
services:
# The Application
app:
build:
context: ./
dockerfile: app.dockerfile
working_dir: /var/www/html
volumes:
- ./public_html:/var/www/html
ports:
- 8888:80
environment:
- "DB_PORT=3306"
- "DB_HOST=database"
# The Web Server
web:
build:
context: ./
dockerfile: web.dockerfile
working_dir: /var/www/html
volumes_from:
- app
ports:
- 8887:80
# The Database
database:
image: mariadb:10.1.36
volumes:
- dbdata:/var/lib/mysql
environment:
- "MYSQL_DATABASE=homestead"
- "MYSQL_USER=homestead"
- "MYSQL_PASSWORD=secret"
- "MYSQL_ROOT_PASSWORD=secret"
ports:
- "33061:3306"
volumes:
dbdata:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment