-
Notifications
You must be signed in to change notification settings - Fork 248
/
docker-compose.yml
104 lines (100 loc) · 2.12 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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
version: '3.7'
volumes:
tfshop_redis_data:
tfshop_mysql_data:
networks:
tfshop-network:
driver: bridge
services:
mysql:
container_name: tfshop-mysql
restart: on-failure
volumes:
- tfshop_mysql_data:/var/lib/mysql
image: mysql:5.7
command: --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci
environment:
- MYSQL_ROOT_PASSWORD=123
- MYSQL_DATABASE=tfshop
ports:
- "3306:3306"
networks:
tfshop-network:
aliases:
- mysql.tfshop
redis:
container_name: tfshop-redis
restart: on-failure
volumes:
- tfshop_redis_data:/data:rw
image: redis:5.0.8
command: redis-server --appendonly yes
ports:
- "6379:6379"
networks:
tfshop-network:
aliases:
- redis.tfshop
php:
container_name: "tfshop-php-fpm"
depends_on:
- redis
- mysql
build:
context: ./docker/php-fpm/
volumes:
- ./api:/var/www/html/
restart: on-failure
networks:
tfshop-network:
aliases:
- php-fpm.tfshop
backend:
container_name: "tfshop-backend"
depends_on:
- php
image: nginx
ports:
- "80:80"
- "443:443"
volumes:
- ./api:/var/www/html/:rw
- ./docker/nginx/conf.d:/etc/nginx/conf.d/:rw
- ./docker/nginx/ssl:/etc/nginx/ssl/:rw
- ./api/storage/logs/:/var/log/nginx/:rw
restart: on-failure
networks:
tfshop-network:
aliases:
- backend.tfshop
- local.tfshop.com
web:
container_name: "tfshop-web"
depends_on:
- backend
build:
context: ./docker/web/
ports:
- "3005:3005"
volumes:
- ./client/nuxt-web/mi/:/src/
# restart: on-failure
networks:
tfshop-network:
aliases:
- web.tfshop
admin:
container_name: "tfshop-admin"
depends_on:
- backend
build:
context: ./docker/admin/
ports:
- "3100:3100"
volumes:
- ./admin/vue2/element-admin-v3/:/src/
# restart: on-failure
networks:
tfshop-network:
aliases:
- admin.tfshop