-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
executable file
·63 lines (59 loc) · 1.22 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
52
53
54
55
56
57
58
59
60
61
62
63
services:
php-fpm:
container_name: php-fpm
build:
context: .
dockerfile: Dockerfile.app
args:
APP_ENV: ${APP_ENV}
env_file:
- .env
extra_hosts:
- "host.docker.internal:host-gateway"
volumes:
- .:/var/www/laravel-app
- ./vendor:/var/www/laravel-app/vendor
working_dir: /var/www/laravel-app
depends_on:
mysql:
condition: service_healthy
networks:
- bridge
nginx:
container_name: nginx
build:
context: .
dockerfile: Dockerfile.nginx
environment:
- PHP_UPSTREAM_HOST=php-fpm
ports:
- '80:80'
depends_on:
- php-fpm
networks:
- bridge
redis:
container_name: ${REDIS_HOST}
image: redis
command: redis-server --requirepass ${REDIS_PASSWORD}
ports:
- '6379:6379'
networks:
- bridge
mysql:
container_name: ${DB_HOST}
image: mysql:8.0
ports:
- '3306:3306'
environment:
MYSQL_DATABASE: ${DB_DATABASE}
MYSQL_ROOT_PASSWORD: ${DB_PASSWORD}
healthcheck:
test: ["CMD", "mysqladmin", "ping", "-h", "localhost"]
interval: 5s
timeout: 10s
retries: 5
networks:
- bridge
networks:
bridge: