forked from nathalie/pedi2
57 lines
1.2 KiB
YAML
57 lines
1.2 KiB
YAML
version: "3.3"
|
|
services:
|
|
app:
|
|
build:
|
|
args:
|
|
user: www
|
|
uid: 1000
|
|
context: ./
|
|
dockerfile: Dockerfile
|
|
image: laravel-image
|
|
container_name: pedi2-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: pedi2-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
|
|
|
|
nginx:
|
|
image: nginx:alpine
|
|
container_name: pedi2-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 |