We define and flesh out our app
service, which includes instructions on how to build our app
service image using our local Dockerfile
and supporting configuration files.
version: '3'
services:
app:
build:
context: ./docker/app
dockerfile: Dockerfile
image: shippingdocker/app:latest
networks:
- appnet
volumes:
- ./application:/var/www/html
cache:
image: redis:alpine
networks:
- appnet
volumes:
- cachedata:/data
db:
image: mysql:5.7
environment:
MYSQL_ROOT_PASSWORD: secret
MYSQL_DATABASE: homestead
MYSQL_USER: homestead
MYSQL_PASSWORD: secret
networks:
- appnet
volumes:
- dbdata:/var/lib/mysql
networks:
appnet:
driver: bridge
volumes:
dbdata:
driver: local
cachedata:
driver: local