planifibo7/docker-compose.yml

54 lines
1.1 KiB
YAML
Raw Normal View History

2021-11-25 16:19:13 -03:00
version: "3.7"
services:
app:
build:
args:
user: www
uid: 1000
context: ./
dockerfile: Dockerfile
image: laravel-image
container_name: laravel-app
restart: unless-stopped
working_dir: /var/www/
volumes:
- ./:/var/www
- ./php/local.ini:/usr/local/etc/php/conf.d/local.ini
networks:
- app-network
db:
image: mysql:5.7
container_name: laravel-db
restart: unless-stopped
ports:
2021-12-02 12:10:13 -03:00
- "${DB_PORT}:3306"
2021-11-25 16:19:13 -03:00
environment:
MYSQL_DATABASE: ${DB_DATABASE}
MYSQL_ROOT_PASSWORD: ${DB_PASSWORD}
MYSQL_PASSWORD: ${DB_PASSWORD}
MYSQL_USER: ${DB_USERNAME}
SERVICE_TAGS: dev
SERVICE_NAME: mysql
volumes:
- ./mysql/my.cnf:/etc/mysql/my.cnf
- ./mysql/docker-entrypoint-initdb.d/:/docker-entrypoint-initdb.d/
networks:
- app-network
nginx:
image: nginx:alpine
container_name: laravel-nginx
restart: unless-stopped
ports:
2021-12-02 12:10:13 -03:00
- ${NGINX_PORT}:80
2021-11-25 16:19:13 -03:00
volumes:
- ./:/var/www
- ./nginx/conf.d/:/etc/nginx/conf.d/
networks:
- app-network
networks:
app-network:
driver: bridge