-
Notifications
You must be signed in to change notification settings - Fork 11
/
docker-compose.yaml
67 lines (61 loc) · 1.28 KB
/
docker-compose.yaml
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
version: '2.3'
services:
#PHP Service
app:
build: ./app
container_name: app
working_dir: /application
# volumes:
# - ./app/:/var/www
networks:
- app-network
environment:
- DB_DATABASE=laravel
- DB_PASSWORD=root
- DB_USERNAME=root
- DB_HOST=db
depends_on:
db:
condition: service_healthy
#Nginx Service
nginx:
build: ./nginx
container_name: nginx
restart: always
tty: true
ports:
- "8000:80"
volumes:
- ./app/:/var/www
networks:
- app-network
#Redis Service
redis:
image: redis:alpine
expose:
- 6379
#MySQL Service
db:
image: mysql:5.7
command: --innodb-use-native-aio=0
container_name: db
restart: always
tty: true
ports:
- "33600:3306"
environment:
- MYSQL_DATABASE=laravel
- MYSQL_ROOT_PASSWORD=root
- MYSQL_USER=root
volumes:
- ./.docker/dbdata:/var/lib/mysql
networks:
- app-network
healthcheck:
test: ["CMD-SHELL", 'mysql -uroot --database=laravel --password=root --execute="SELECT count(table_name) > 0 FROM information_schema.tables;" --skip-column-names -B']
interval: 10s
timeout: 10s
retries: 4
networks:
app-network:
driver: bridge