forked from Anaya-Multimedia/curso-de-php-8-y-mysql-8
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
43 lines (39 loc) · 1.04 KB
/
docker-compose.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
version: '3'
services:
php:
build:
context: ./
dockerfile: Dockerfile
volumes:
- ./www:/srv/www/api
- ./docker/php/www.conf:/usr/local/etc/php-fpm.d/www.conf
ports:
- 9000:9000
- 3000:3000
environment:
MYSQL_USER: ${MYSQL_USER}
MYSQL_PASSWORD: ${MYSQL_PASSWORD}
nginx:
image: nginx:mainline-alpine
ports:
- 8000:80
- 8001:81
- 8002:82
volumes:
- ./www:/srv/www/api
- ./docker/nginx/default.conf:/etc/nginx/conf.d/default.conf
depends_on:
- php
mysql:
image: mysql
volumes:
- ./data/db:/var/lib/mysql
ports:
- 3306:3306
depends_on:
- php
environment:
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD}
MYSQL_DATABASE: ${MYSQL_DATABASE}
MYSQL_USER: ${MYSQL_USER}
MYSQL_PASSWORD: ${MYSQL_PASSWORD}