-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
46 lines (41 loc) · 1.09 KB
/
docker-compose.yml
File metadata and controls
46 lines (41 loc) · 1.09 KB
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
x-zane-env:
TYPESENSE_API_KEY: "{{ generate_password | 32 }}"
TYPESENSE_ENABLE_CORS: "true"
MAIN_DOMAIN: "{{ generate_domain }}"
TEMPLATE_API_ALIAS: to-complete
services:
typesense:
image: typesense/typesense:29.0
restart: unless-stopped
environment:
- TYPESENSE_API_KEY=${TYPESENSE_API_KEY:-typesense}
- TYPESENSE_ENABLE_CORS=${TYPESENSE_ENABLE_CORS:-true}
- TYPESENSE_DATA_DIR=/data
volumes:
- typesense-data:/data
proxy:
image: caddy:2-alpine
configs:
- source: caddyfile
target: /etc/caddy/Caddyfile
deploy:
labels:
zane.http.routes.0.domain: ${MAIN_DOMAIN}
zane.http.routes.0.port: 80
volumes:
typesense-data:
configs:
caddyfile:
content: |
:{$PORT:80} {
log
reverse_proxy ${TEMPLATE_API_ALIAS}:3000
header {
Access-Control-Allow-Origin *
Access-Control-Allow-Methods "GET, OPTIONS"
Access-Control-Allow-Headers "*"
Access-Control-Max-Age 86400
}
@options method OPTIONS
respond @options 204
}