-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy pathdocker-compose.yml
126 lines (119 loc) · 2.88 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
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
version: "3"
services:
php72:
build:
context: .
args:
PHP_VERSION: 7.2
platform: linux/arm64/v8
container_name: php72
restart: always
working_dir: /var/www
volumes:
- ~/.ssh:/root/.ssh/
- ${WEB_ROOT}:/var/www:cached
- ${COMPOSER}/php72:/root/.composer/
- ${PHP72_INI}:/usr/local/etc/php/php.ini
environment:
TZ: "$TZ"
WEB_ENV: "local" # 信用飞项目使用
ports: # hexo 需要 4000 端口
- 4000:4000
extra_hosts:
- fund-api.test:172.20.128.2
- fund-system.test:172.20.128.2
- xyf-pay-system.test:172.20.128.2
- shoufuyou-pay-gateway.test:172.20.128.2
- xyf-middleground-system.test:172.20.128.2
networks:
static-network:
# php73:
# build:
# context: .
# args:
# PHP_VERSION: 7.3
# container_name: php73
# restart: always
# working_dir: /var/www
# volumes:
# - ${WEB_ROOT}:/var/www
# - ${COMPOSER}/php73:/root/.composer/
# - ${PHP73_INI}:/usr/local/etc/php/php.ini
# environment:
# TZ: "$TZ"
# ports:
# - 9501:9501
# networks:
# static-network:
nginx:
image: nginx:alpine
platform: linux/arm64/v8
container_name: nginx
restart: always
volumes:
- ${WEB_ROOT}:/var/www:cached # 需要和 php 的目录一致
- ${NGINX_CONF}:/etc/nginx/conf.d # nginx 配置
- ${LOG}/nginx:/var/log/nginx/ # nginx 日志
ports:
- ${NGINX_PORT}:80
environment:
TZ: "$TZ"
networks:
static-network:
ipv4_address: 172.20.128.2
mysql:
image: mysql:${MYSQL_VERSION}
platform: linux/amd64
container_name: mysql
volumes:
- ${MYSQL_DATA}:/var/lib/mysql
restart: always
environment:
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD}
MYSQL_USER: ${MYSQL_USER}
MYSQL_PASSWORD: ${MYSQL_PASSWORD}
TZ: "$TZ"
ports:
- ${MYSQL_PORT}:3306
networks:
static-network:
redis:
image: redis:${REDIS_VERSION}
platform: linux/arm64/v8
container_name: redis
restart: always
volumes:
- ${REDIS_DATA}:/data
- ${REDIS_CONF}:/usr/local/etc/redis/redis.conf
ports:
- ${REDIS_PORT}:6379
command: [ redis-server, "/usr/local/etc/redis/redis.conf" ]
networks:
static-network:
sftp:
image: atmoz/sftp
platform: linux/amd64
container_name: sftp
restart: always
volumes:
- ${SFTP_DIR}:/home/foo/
ports:
- ${SFTP_PORT}:22
command: ${SFTP_USER}:${SFTP_PASSWORD}:1001
networks:
static-network:
rmq:
image: rabbitmq:3-management
platform: linux/arm64/v8
container_name: rmq
restart: always
ports:
- ${RMQ_WEB_PORT}:15672
- ${RMQ_PORT}:5672
networks:
static-network:
networks:
static-network:
ipam:
config:
- subnet: 172.20.0.0/16