-
Notifications
You must be signed in to change notification settings - Fork 4
/
docker-compose.yml
144 lines (133 loc) · 3.23 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
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
version: '3'
networks:
frontend:
backend:
volumes:
mysql:
redis:
caddy_data:
caddy_config:
services:
### workspace ##################################
workspace:
build:
context: ./workspace
args:
- PUID=${HOST_PUID}
- PGID=${HOST_PGID}
- TZ=${WORKSPACE_TIMEZONE}
- NODE_VERSION=${WORKSPACE_NODE_VERSION}
- YARN_VERSION=${WORKSPACE_YARN_VERSION}
- APP_CODE_PATH=${APP_CODE_PATH_CONTAINER}
environment:
- APP_CODE_PATH=${APP_CODE_PATH_CONTAINER}
volumes:
- ${APP_CODE_PATH_HOST}:${APP_CODE_PATH_CONTAINER}
tty: true
networks:
- frontend
- backend
### php-fpm ##############################################
php-fpm:
build:
context: ./php-fpm
args:
- PUID=${HOST_PUID}
- PGID=${HOST_PGID}
- APP_CODE_PATH=${APP_CODE_PATH_CONTAINER}
restart: unless-stopped
volumes:
- ${APP_CODE_PATH_HOST}:${APP_CODE_PATH_CONTAINER}
expose:
- "9000"
depends_on:
- workspace
- db
- redis
- websockets
networks:
- backend
### caddy ###############################################
caddy:
image: caddy:2.2.1
environment:
- CADDY_HOST_LABEL=${CADDY_HOST_LABEL}
- APP_CODE_PATH=${APP_CODE_PATH_CONTAINER}
restart: unless-stopped
volumes:
- ${APP_CODE_PATH_HOST}:${APP_CODE_PATH_CONTAINER}
- caddy_data:/data
- caddy_config:/config
- ./caddy/Caddyfile:/etc/caddy/Caddyfile
ports:
- "${CADDY_HOST_HTTP_PORT}:80"
- "${CADDY_HOST_HTTPS_PORT}:443"
depends_on:
- php-fpm
networks:
- frontend
- backend
### db ##################################################
db:
build:
context: ./db
environment:
- MYSQL_DATABASE=${DB_DATABASE}
- MYSQL_USER=${DB_USER}
- MYSQL_PASSWORD=${DB_PASSWORD}
- MYSQL_ROOT_PASSWORD=${DB_ROOT_PASSWORD}
- TZ=${WORKSPACE_TIMEZONE}
restart: unless-stopped
volumes:
- ${DATA_PATH_HOST}/db:/var/lib/mysql
- ${DB_ENTRYPOINT_INITDB}:/docker-entrypoint-initdb.d
expose:
- "3306"
# ports:
# - "${DB_PORT}:3306"
networks:
- backend
### redis ###############################################
redis:
build: ./redis
restart: unless-stopped
volumes:
- ${DATA_PATH_HOST}/redis:/data
expose:
- "6379"
# ports:
# - "${REDIS_PORT}:6379"
networks:
- backend
### websockets ##########################################
websockets:
build:
context: ./websockets
args:
- PUID=${HOST_PUID}
- PGID=${HOST_PGID}
- APP_CODE_PATH=${APP_CODE_PATH_CONTAINER}
restart: unless-stopped
volumes:
- ${APP_CODE_PATH_HOST}:${APP_CODE_PATH_CONTAINER}
expose:
- "6001"
depends_on:
- redis
networks:
- backend
### horizon #############################################
horizon:
build:
context: ./horizon
args:
- PUID=${HOST_PUID}
- PGID=${HOST_PGID}
- APP_CODE_PATH=${APP_CODE_PATH_CONTAINER}
restart: unless-stopped
volumes:
- ${APP_CODE_PATH_HOST}:${APP_CODE_PATH_CONTAINER}
depends_on:
- redis
networks:
- backend