-
Notifications
You must be signed in to change notification settings - Fork 0
/
compose.yml
60 lines (60 loc) · 1.65 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
services:
frontend:
restart: always
build:
context: ./frontend
dockerfile: Dockerfile
args:
REMOTE_PAGES_REPO_URL: ${REMOTE_PAGES_REPO_URL:-}
NOTEBOOK_MODE: production
container_name: notebook-frontend
ports:
- "80:80"
- "443:443"
env_file: .env
depends_on:
- backend
backend:
restart: always
build:
context: ./backend
dockerfile: Dockerfile
container_name: notebook-backend
environment:
NOTEBOOK_MODE: production
ports:
- "8000:8000"
volumes:
- "${LOCAL_PAGES_REPO}:${LOCAL_PAGES_REPO}"
env_file: .env
command: bash -c "python -m init.clone_git && python -m init.index_elasticsearch && exec uvicorn notebook.main:app --host 0.0.0.0 --port 8000"
secrets:
- notebook_ssh_key
depends_on:
elasticsearch:
condition: service_healthy
elasticsearch:
restart: always
image: elasticsearch:8.9.0
ports:
- "9200:9200"
container_name: notebook-elasticsearch
environment:
SERVER_NAME: "elasticsearch"
ES_JAVA_OPTS: "-Xms512m -Xmx512m"
network.bind_host: 0.0.0.0
network.host: 0.0.0.0
discovery.type: single-node
xpack.security.enabled: false
http.cors.enabled: true
http.cors.allow-origin: "https://notebook"
http.cors.allow-headers: "X-Requested-With,X-Auth-Token,Content-Type,Content-Length,Authorization,x-elastic-client-meta"
http.cors.allow-credentials: true
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:9200"]
interval: 1s
timeout: 3s
retries: 30
secrets:
notebook_ssh_key:
file: ~/.ssh/notebook