-
-
Notifications
You must be signed in to change notification settings - Fork 10.7k
/
Copy pathcompose.yml
207 lines (204 loc) · 8.69 KB
/
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
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
name: ghost
services:
ghost:
build:
context: .
dockerfile: ./.docker/Dockerfile
target: development
entrypoint: [ "/home/ghost/.docker/development.entrypoint.sh" ]
command: [ "yarn", "dev" ]
ports:
- "2368:2368" # Ghost
- "4200:4200" # Admin
- "4201:4201" # Admin tests
- "4175:4175" # Portal
- "4176:4176" # Portal HTTPS
- "4177:4177" # Announcement bar
- "4178:4178" # Search
- "6174:6174" # Signup form
- "7173:7173" # Comments
- "7174:7174" # Comments HTTPS
profiles: [ ghost ]
volumes:
# Mount the source code
- .:/home/ghost
## SSH Agent forwarding
- ${SSH_AUTH_SOCK}:/ssh-agent
## Git config
- ${HOME}/.gitconfig:/root/.gitconfig:ro
# Volume exclusions:
## Prevent collisions between host and container node_modules
- node_modules_ghost_root:/home/ghost/node_modules:delegated
- node_modules_ghost_admin:/home/ghost/ghost/admin/node_modules:delegated
- node_modules_ghost_api-framework:/home/ghost/ghost/api-framework/node_modules:delegated
- node_modules_ghost_constants:/home/ghost/ghost/constants/node_modules:delegated
- node_modules_ghost_core:/home/ghost/ghost/core/node_modules:delegated
- node_modules_ghost_custom-fonts:/home/ghost/ghost/custom-fonts/node_modules:delegated
- node_modules_ghost_custom-theme-settings-service:/home/ghost/ghost/custom-theme-settings-service/node_modules:delegated
- node_modules_ghost_domain-events:/home/ghost/ghost/domain-events/node_modules:delegated
- node_modules_ghost_donations:/home/ghost/ghost/donations/node_modules:delegated
- node_modules_ghost_email-addresses:/home/ghost/ghost/email-addresses/node_modules:delegated
- node_modules_ghost_email-service:/home/ghost/ghost/email-service/node_modules:delegated
- node_modules_ghost_email-suppression-list:/home/ghost/ghost/email-suppression-list/node_modules:delegated
- node_modules_ghost_html-to-plaintext:/home/ghost/ghost/html-to-plaintext/node_modules:delegated
- node_modules_ghost_i18n:/home/ghost/ghost/i18n/node_modules:delegated
- node_modules_ghost_job-manager:/home/ghost/ghost/job-manager/node_modules:delegated
- node_modules_ghost_link-replacer:/home/ghost/ghost/link-replacer/node_modules:delegated
- node_modules_ghost_magic-link:/home/ghost/ghost/magic-link/node_modules:delegated
- node_modules_ghost_member-attribution:/home/ghost/ghost/member-attribution/node_modules:delegated
- node_modules_ghost_member-events:/home/ghost/ghost/member-events/node_modules:delegated
- node_modules_ghost_members-csv:/home/ghost/ghost/members-csv/node_modules:delegated
- node_modules_ghost_mw-error-handler:/home/ghost/ghost/mw-error-handler/node_modules:delegated
- node_modules_ghost_mw-vhost:/home/ghost/ghost/mw-vhost/node_modules:delegated
- node_modules_ghost_offers:/home/ghost/ghost/offers/node_modules:delegated
- node_modules_ghost_post-events:/home/ghost/ghost/post-events/node_modules:delegated
- node_modules_ghost_post-revisions:/home/ghost/ghost/post-revisions/node_modules:delegated
- node_modules_ghost_posts-service:/home/ghost/ghost/posts-service/node_modules:delegated
- node_modules_ghost_prometheus-metrics:/home/ghost/ghost/prometheus-metrics/node_modules:delegated
- node_modules_ghost_security:/home/ghost/ghost/security/node_modules:delegated
- node_modules_ghost_tiers:/home/ghost/ghost/tiers/node_modules:delegated
- node_modules_ghost_webmentions:/home/ghost/ghost/webmentions/node_modules:delegated
- node_modules_apps_admin-x-activitypub:/home/ghost/apps/admin-x-activitypub/node_modules:delegated
- node_modules_apps_admin-x-design-system:/home/ghost/apps/admin-x-design-system/node_modules:delegated
- node_modules_apps_admin-x-framework:/home/ghost/apps/admin-x-framework/node_modules:delegated
- node_modules_apps_admin-x-settings:/home/ghost/apps/admin-x-settings/node_modules:delegated
- node_modules_apps_announcement-bar:/home/ghost/apps/announcement-bar/node_modules:delegated
- node_modules_apps_comments-ui:/home/ghost/apps/comments-ui/node_modules:delegated
- node_modules_apps_portal:/home/ghost/apps/portal/node_modules:delegated
- node_modules_apps_posts:/home/ghost/apps/posts/node_modules:delegated
- node_modules_apps_shade:/home/ghost/apps/shade/node_modules:delegated
- node_modules_apps_signup-form:/home/ghost/apps/signup-form/node_modules:delegated
- node_modules_apps_sodo-search:/home/ghost/apps/sodo-search/node_modules:delegated
- node_modules_apps_stats:/home/ghost/apps/stats/node_modules:delegated
tty: true
depends_on:
mysql:
condition: service_healthy
redis:
condition: service_healthy
environment:
- DEBUG=${DEBUG:-}
- SSH_AUTH_SOCK=/ssh-agent
- NX_DAEMON=${NX_DAEMON:-true}
- GHOST_DEV_IS_DOCKER=true
- GHOST_DEV_APP_FLAGS=${GHOST_DEV_APP_FLAGS:-}
- GHOST_UPSTREAM=${GHOST_UPSTREAM:-}
- STRIPE_SECRET_KEY=${STRIPE_SECRET_KEY:-}
- STRIPE_PUBLISHABLE_KEY=${STRIPE_PUBLISHABLE_KEY:-}
- STRIPE_ACCOUNT_ID=${STRIPE_ACCOUNT_ID:-}
mysql:
image: mysql:8.4.5
container_name: ghost-mysql
command: --innodb-buffer-pool-size=1G --innodb-log-buffer-size=500M --innodb-change-buffer-max-size=50 --innodb-flush-log-at-trx_commit=0 --innodb-flush-method=O_DIRECT
ports:
- 3306:3306
environment:
MYSQL_ROOT_PASSWORD: root
MYSQL_DATABASE: ghost
restart: always
volumes:
- ./.docker/mysql-preload:/docker-entrypoint-initdb.d
- mysql-data:/var/lib/mysql
healthcheck:
test: mysql -uroot -proot ghost -e 'select 1'
interval: 1s
retries: 120
redis:
image: redis:7.0
container_name: ghost-redis
ports:
- 6379:6379
restart: always
volumes:
- redis-data:/data
healthcheck:
test:
- CMD
- redis-cli
- --raw
- incr
- ping
interval: 1s
retries: 120
prometheus:
profiles: [ monitoring ]
image: prom/prometheus:v2.55.1
container_name: ghost-prometheus
ports:
- 9090:9090
restart: always
volumes:
- ./.docker/prometheus/prometheus.yml:/etc/prometheus/prometheus.yml
grafana:
profiles: [ monitoring ]
image: grafana/grafana:8.5.27
container_name: ghost-grafana
ports:
- 3000:3000
restart: always
environment:
- GF_AUTH_ANONYMOUS_ENABLED=true
- GF_AUTH_ANONYMOUS_ORG_ROLE=Admin
volumes:
- ./.docker/grafana/datasources:/etc/grafana/provisioning/datasources
- ./.docker/grafana/dashboard.yml:/etc/grafana/provisioning/dashboards/main.yaml
- ./.docker/grafana/dashboards:/var/lib/grafana/dashboards
pushgateway:
profiles: [ monitoring ]
image: prom/pushgateway:v1.11.1
container_name: ghost-pushgateway
ports:
- 9091:9091
mailhog:
image: mailhog/mailhog:latest
container_name: ghost-mailhog
profiles: [ ghost ]
ports:
- "1025:1025" # SMTP server
- "8025:8025" # Web interface
restart: always
volumes:
mysql-data: {}
redis-data: {}
node_modules_ghost_root: {}
node_modules_ghost_admin: {}
node_modules_ghost_api-framework: {}
node_modules_ghost_constants: {}
node_modules_ghost_core: {}
node_modules_ghost_custom-fonts: {}
node_modules_ghost_custom-theme-settings-service: {}
node_modules_ghost_domain-events: {}
node_modules_ghost_donations: {}
node_modules_ghost_email-addresses: {}
node_modules_ghost_email-service: {}
node_modules_ghost_email-suppression-list: {}
node_modules_ghost_html-to-plaintext: {}
node_modules_ghost_i18n: {}
node_modules_ghost_job-manager: {}
node_modules_ghost_link-replacer: {}
node_modules_ghost_magic-link: {}
node_modules_ghost_member-attribution: {}
node_modules_ghost_member-events: {}
node_modules_ghost_members-csv: {}
node_modules_ghost_mw-error-handler: {}
node_modules_ghost_mw-vhost: {}
node_modules_ghost_offers: {}
node_modules_ghost_post-events: {}
node_modules_ghost_post-revisions: {}
node_modules_ghost_posts-service: {}
node_modules_ghost_prometheus-metrics: {}
node_modules_ghost_security: {}
node_modules_ghost_tiers: {}
node_modules_ghost_webmentions: {}
node_modules_apps_admin-x-activitypub: {}
node_modules_apps_admin-x-design-system: {}
node_modules_apps_admin-x-framework: {}
node_modules_apps_admin-x-settings: {}
node_modules_apps_announcement-bar: {}
node_modules_apps_comments-ui: {}
node_modules_apps_portal: {}
node_modules_apps_posts: {}
node_modules_apps_shade: {}
node_modules_apps_signup-form: {}
node_modules_apps_sodo-search: {}
node_modules_apps_stats: {}