pedi2/docker-compose.yml

60 lines
1.2 KiB
YAML
Raw Normal View History

2022-05-18 18:25:51 -03:00
version: "3.3"
2021-12-30 11:49:40 -03:00
services:
app:
build:
args:
user: www
2023-03-20 21:27:25 -03:00
uid: ${USERID}
2021-12-30 11:49:40 -03:00
context: ./
dockerfile: Dockerfile
image: laravel-image
container_name: pedi2-app
2021-12-30 11:49:40 -03:00
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
2021-12-30 11:49:40 -03:00
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/
2022-01-04 09:07:43 -03:00
- dbdata:/var/lib/mysql
2021-12-30 11:49:40 -03:00
networks:
- app-network
2022-06-08 18:26:38 -03:00
ports:
- ${DB_PORT_EXPOSED}:3306
2021-12-30 11:49:40 -03:00
nginx:
image: nginx:alpine
container_name: pedi2-nginx
2021-12-30 11:49:40 -03:00
restart: unless-stopped
ports:
2022-05-18 18:25:51 -03:00
- ${NGINX_PORT}:80
2021-12-30 11:49:40 -03:00
volumes:
- ./:/var/www
- ./nginx/conf.d/:/etc/nginx/conf.d/
networks:
- app-network
networks:
app-network:
driver: bridge
2022-01-04 09:07:43 -03:00
#Volumes
volumes:
dbdata:
driver: local