generated from rakibdevs/laravel-docker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
51 lines (49 loc) · 1.13 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
44
45
46
47
48
49
50
51
version: "3"
services:
nginx:
image: nginx:1.20
restart: unless-stopped
tty: true
ports:
- "8999:80"
volumes:
- ./src:/app
- ./docker/nginx/nginx.conf:/etc/nginx/conf.d/default.conf
links:
- php
networks:
- default
php:
build:
context: ./docker/php
volumes:
- ./src:/app
- ./docker/php/www.conf:/usr/local/etc/php-fpm.d/www.conf:rw
- ./docker/php/php.ini:/usr/local/etc/php/php.ini:rw
- ./docker/php/openssl.cnf:/etc/ssl/openssl.cnf:rw
user: "1000:0"
logging:
driver: "json-file"
options:
max-size: "200k"
max-file: "3"
extra_hosts:
- "host.docker.internal:host-gateway"
working_dir: /app
depends_on:
- mysql
networks:
- default
mysql:
image: mysql
command: --default-authentication-plugin=mysql_native_password
restart: unless-stopped
environment:
MYSQL_DATABASE: ${DB_DATABASE:-laravel}
MYSQL_ROOT_PASSWORD: ${DB_PASSWORD:-1234}
ports:
- 3399:${DB_PORT:-3306}
volumes:
- ./docker/database:/var/lib/mysql
networks:
- default