pedi3/docker-compose.yml

59 lines
1.2 KiB
YAML

version: "3.3"
services:
app:
build:
args:
user: www
uid: ${USERID}
context: ./
dockerfile: Dockerfile
image: laravel-image
container_name: jetstream-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: jetstream-db
restart: unless-stopped
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/
- dbdata:/var/lib/mysql
networks:
- app-network
ports:
- ${DB_PORT_EXPOSED}:3306
nginx:
image: nginx:alpine
container_name: jetstream-nginx
restart: unless-stopped
ports:
- ${NGINX_PORT}:80
volumes:
- ./:/var/www
- ./nginx/conf.d/:/etc/nginx/conf.d/
networks:
- app-network
networks:
app-network:
driver: bridge
#Volumes
volumes:
dbdata:
driver: local