-
Notifications
You must be signed in to change notification settings - Fork 24
/
docker-compose.ssl.dev.yml
118 lines (110 loc) · 2.98 KB
/
docker-compose.ssl.dev.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
version: '3.9'
services:
caddy:
image: caddy
restart: unless-stopped
ports:
- "443:443"
environment:
SERVER_DOMAIN: ${SERVER_DOMAIN}
MEDIA_HOSTING_URL: ${MEDIA_HOSTING_URL}
MEDIA_HOSTING_CLIENT_ID: ${MEDIA_HOSTING_CLIENT_ID}
FINGERPRINT: ${FINGERPRINT}
volumes:
- $PWD/caddy/Caddyfile.ssl.dev:/etc/caddy/Caddyfile
- $PWD/caddy/certs:/certs
- caddy_data:/data
- caddy_config:/config
# Default caddy command borrowed from https://github.com/caddyserver/caddy-docker/blob/master/Dockerfile.tmpl
command: ["caddy", "run", "--config", "/etc/caddy/Caddyfile", "--adapter", "caddyfile", "--watch"]
extra_hosts:
- "host.docker.internal:host-gateway"
mysql:
platform: linux/amd64
image: mysql:5.7
restart: always
environment:
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD}
volumes:
- mysql_db:/var/lib/mysql
- $PWD/mysql/schema.sql:/docker-entrypoint-initdb.d/schema.sql:ro
ports:
- "3306:3306"
- "33060:33060"
healthcheck:
test: [ "CMD", "mysqladmin" ,"ping", "-h", "localhost", "-uroot", "-p${MYSQL_ROOT_PASSWORD}"]
interval: 5s
timeout: 20s
retries: 10
redis:
image: redis:7
restart: always
ports:
- "6379:6379"
command: redis-server --save 20 1 --requirepass ${REDIS_PASSWORD}
volumes:
- redis_data:/data
healthcheck:
test: redis-cli -a ${REDIS_PASSWORD} ping | grep PONG
interval: 5s
timeout: 20s
retries: 10
feed:
build:
context: feed
restart: always
ports:
- "6767:6767"
elasticsearch:
image: elasticsearch:7.17.8
restart: always
ports:
- "9200:9200"
- "9300:9300"
environment:
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"
ulimits:
nofile:
soft: 65536
hard: 65536
memlock:
soft: -1
hard: -1
healthcheck:
test: curl -s -f http://localhost:9200/_cluster/health?wait_for_status=green >/dev/null || exit 1
interval: 10s
timeout: 30s
retries: 10
volumes:
- elasticsearch_data:/usr/share/elastic-setup/data
- $PWD/search/elasticsearch.yml:/usr/share/elasticsearch/config/elasticsearch.yml:ro
# performs initial setup of elasticsearch and exits
# backend should depend on this service for prod configs
elasticsearch-setup:
image: curlimages/curl
restart: "no"
depends_on:
elasticsearch:
condition: service_healthy
volumes:
- $PWD/search/setup.sh:/setup.sh:ro
entrypoint: /bin/sh
command: /setup.sh
# performs periodic indexing of elasticsearch
elasticsearch-indexer:
build:
context: search
restart: always
depends_on:
mysql:
condition: service_healthy
elasticsearch:
condition: service_healthy
elasticsearch-setup:
condition: service_completed_successfully
volumes:
caddy_data:
caddy_config:
mysql_db:
redis_data:
elasticsearch_data: