-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
102 lines (94 loc) · 2.67 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
version: '3.7'
networks:
develop:
services:
nginx:
image: "nginx:alpine"
ports:
- "${NGINX_PORT}:80"
volumes:
- ./www:/www # 项目目录
- ./services/nginx/nginx.conf:/etc/nginx/nginx.conf # nginx配置
- ./services/nginx/sites:/etc/nginx/conf.d # 站点配置
- ./services/logs/nginx:/var/log/nginx # 日志
networks:
- develop
depends_on:
- php72
- mysql
- redis
php72:
build:
context: ./services/php
target: php72
volumes:
- ./www:/www # 项目目录
- ./services/php/php.ini:/usr/local/etc/php/php.ini # php配置
- ./services/logs/php:/var/log/error.log # php错误日志
networks:
- develop
mysql:
image: "mysql:5.7"
ports:
- "${MYSQL_PORT}:3306"
volumes:
- ./services/database/mysql/mysqld.cnf:/etc/mysql/mysql.conf.d/mysqld.cnf # mysql配置
- ./services/database/mysql/data:/var/lib/mysql # mysql数据
environment:
MYSQL_ROOT_PASSWORD: ${DB_ROOT_PASSWORD}
MYSQL_USER: ${DB_USER}
MYSQL_PASSWORD: ${DB_PASSWORD}
networks:
- develop
redis:
image: "redis:5.0.6-alpine"
command: "redis-server /usr/local/etc/redis/redis.conf --appendonly yes"
ports:
- "${REDIS_PORT}:6379"
volumes:
- ./services/redis/data:/data # redis数据持久化
- ./services/redis/redis.conf:/usr/local/etc/redis/redis.conf # redis 配置文件
networks:
- develop
frpc:
image: "snowdreamtech/frpc:0.27.0"
volumes:
- ./services/frpc/frpc.ini:/etc/frp/frpc.ini
networks:
- develop
depends_on:
- nginx
# elasticsearch:
# build:
# context: ./services/elasticsearch
# ports:
# - 9200:9200
# environment:
# discovery.type: single-node
# http.port: 9200
# http.cors.allow-origin: 'http://localhost:9100,http://127.0.0.1:9100'
# http.cors.enabled: 'true'
# http.cors.allow-headers: 'X-Requested-With,X-Auth-Token,Content-Type,Content-Length,Authorization'
# http.cors.allow-credentials: 'true'
# volumes:
# - ./services/elasticsearch/plugins:/usr/share/elasticsearch/plugins #插件文件挂载
# - ./services/elasticsearch/data:/usr/share/elasticsearch/data #数据文件挂载
# networks:
# - develop
workspace:
container_name: workspace
tty: true
build:
context: ./services/php
target: workspace
args:
- GIT_NAME=$GIT_NAME
- GIT_EMAIL=$GIT_EMAIL
ports:
- 6001:6001
volumes:
- ./www:/www
- ./services/workspace/ssh:/root/.ssh
- ./services/workspace/composer/:/root/.composer
networks:
- develop