forked from baijunyao/laravel-bjyblog
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
63 lines (57 loc) · 1.44 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
version: "3.7"
services:
traefik:
image: traefik:v2.1
command: --api.insecure=true --providers.docker
ports:
- "80:80"
- "8080:8080"
volumes:
- /var/run/docker.sock:/var/run/docker.sock
mysql:
image: baijunyao/mysql:8.0
container_name: laravel-bjyblog-mysql
environment:
- MYSQL_ROOT_PASSWORD=laravel_bjyblog
- MYSQL_DATABASE=laravel_bjyblog
- MYSQL_USER=root
- MYSQL_PASSWORD=laravel_bjyblog
volumes:
- mysql:/var/lib/mysql
labels:
- traefik.enable=false
redis:
image: redis:5
container_name: laravel-bjyblog-redis
labels:
- traefik.enable=false
nginx:
image: baijunyao/nginx:1.19
container_name: laravel-bjyblog-nginx
volumes:
- .:/app
- ./deploy/docker/nginx/laravel-bjyblog.conf:/etc/nginx/conf.d/laravel-bjyblog.conf
labels:
- traefik.port=80
- "traefik.http.routers.laravel-bjyblog-nginx.rule=Host(`laravel-bjyblog.test`)"
environment:
FASTCGI_PASS: php:9000
DOCUMENT_ROOT: /app/public
php:
image: baijunyao/php:8.0-${APP_ENV}
container_name: laravel-bjyblog-php
tty: true
volumes:
- .:/app
environment:
REDIS_HOST: redis
DB_HOST: mysql
labels:
- traefik.enable=false
elasticsearch:
image: baijunyao/elasticsearch:7.6
container_name: laravel-bjyblog-elasticsearch
environment:
- discovery.type=single-node
volumes:
mysql: