Skip to content

Instantly share code, notes, and snippets.

@ansargondal
Created May 27, 2019 06:12
Show Gist options
  • Save ansargondal/22f84f7b7c341403f22ec48e22ad618e to your computer and use it in GitHub Desktop.
Save ansargondal/22f84f7b7c341403f22ec48e22ad618e to your computer and use it in GitHub Desktop.
version: '3'
services:
# The Application
app:
container_name: "app_container"
build:
context: ./
dockerfile: docker/app.dockerfile
working_dir: /var/www
volumes:
- ./:/var/www
# The Web Server
web:
container_name: "web_container"
build:
context: ./
dockerfile: docker/web.dockerfile
working_dir: /var/www
volumes:
- ./:/var/www
ports:
- 8080:80
# The Database
database:
container_name: "database_container"
image: mariadb
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