-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.laravel.yml
81 lines (74 loc) · 1.91 KB
/
docker-compose.laravel.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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
version: '3.4'
services:
app:
image: pnlinh/laravel:php${PHP_VERSION:-8.1}
hostname: "${DOCKER_PREFIX_NAME}-app"
container_name: "${DOCKER_PREFIX_NAME}-app"
environment:
PHP_IDE_CONFIG: serverName="${DOCKER_PREFIX_NAME}-app.docker.cli"
extra_hosts:
- host.docker.internal:host-gateway
ports:
- "${DOCKER_APP_PORT:-80}:80"
volumes:
- ./:/var/www/html
networks:
- localnet
mysql:
image: mysql:8.0.34
container_name: "${DOCKER_PREFIX_NAME}-mysql"
command: --default-authentication-plugin=mysql_native_password
environment:
MYSQL_ROOT_PASSWORD: "${DB_PASSWORD}"
MYSQL_ROOT_HOST: "%"
MYSQL_PASSWORD: "${DB_PASSWORD}"
MYSQL_USER: "${DB_USERNAME}"
MYSQL_DATABASE: "${DB_DATABASE}"
MYSQL_ALLOW_EMPTY_PASSWORD: 1
ports:
- "${DOCKER_MYSQL_PORT:-3306}:3306"
volumes:
- mysql-data:/var/lib/mysql
- ./docker/database/mysql/create-testing-database.sh:/docker-entrypoint-initdb.d/10-create-testing-database.sh
healthcheck:
test: ["CMD", "mysqladmin", "ping", "-p${DB_PASSWORD}"]
retries: 3
timeout: 5s
networks:
- localnet
redis:
image: redis:alpine
container_name: "${DOCKER_PREFIX_NAME}-redis"
ports:
- "${DOCKER_REDIS_PORT:-6379}:6379"
volumes:
- redis-data:/data
healthcheck:
test: ["CMD", "redis-cli", "ping"]
retries: 3
timeout: 5s
networks:
- localnet
mail:
image: axllent/mailpit
container_name: "${DOCKER_PREFIX_NAME}-mailpit"
ports:
- "${DOCKER_MAIL_PORT:-8025}:8025"
networks:
- localnet
static-builder:
build:
context: .
dockerfile: docker/node.Dockerfile
image: pnlinh/laravel-mix
container_name: laravel-mix
volumes:
- ./:/app
volumes:
mysql-data:
driver: local
redis-data:
driver: local
networks:
localnet:
driver: "bridge"