-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.dev.yml
More file actions
87 lines (82 loc) · 2.72 KB
/
Copy pathdocker-compose.dev.yml
File metadata and controls
87 lines (82 loc) · 2.72 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
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
services:
mongodb:
image: mongo:${MONGO_VERSION}
container_name: crocodile_mongodb
ports:
- "${MONGO_SERVER_PORT}:27017"
volumes:
- ./mongo_data:/data/db # Local directory for MongoDB data
- ./mongod.conf:/etc/mongod.conf # Custom MongoDB config
command: mongod --config /etc/mongod.conf
fastapi:
build:
context: . # Path to the FastAPI backend
dockerfile: backend/Dockerfile # Use the Dockerfile in the backend folder
container_name: crocodile_fastapi
ports:
- "${FASTAPI_SERVER_PORT:-8000}:8000" # Default to 8000 if not set
volumes:
# Mount the app directory to the container
- ./backend/app:/app
- ./crocodile:/app/crocodile
- ./backend/scripts:/app/scripts
command: uvicorn main:app --host 0.0.0.0 --port 8000 --reload
env_file:
- .env # Load environment variables from .env file
el_worker:
build:
context: . # Path to the FastAPI backend
dockerfile: backend/Dockerfile
container_name: crocodile_el_worker
volumes:
# Mount the app directory to the container
- ./backend/app:/app
- ./crocodile:/app/crocodile
- ./backend/scripts:/app/scripts
command: python -m el_jobs.worker
env_file:
- .env # Load environment variables from .env file
depends_on:
- mongodb
# Development-only Jupyter service for debugging
jupyter:
build: .
container_name: crocodile_jupyter
ports:
- "${JUPYTER_SERVER_PORT:-8888}:8888" # Default to 8888 if not set
volumes:
- ./notebooks:/home/jovyan/work
- ./crocodile:/home/jovyan/work/crocodile
- ./tables:/home/jovyan/work/tables
- ./training/:/home/jovyan/work/training
- ./backend:/home/jovyan/work/backend # Include backend code for debugging
command: start-notebook.sh --NotebookApp.token='' --NotebookApp.password=''
environment:
- JUPYTER_ENABLE_LAB=yes
env_file:
- .env # Load environment variables from .env file
depends_on:
- mongodb
- fastapi
elastic:
image: docker.elastic.co/elasticsearch/elasticsearch:8.18.0
container_name: crocodile_elastic
volumes:
- ./elasticdata:/usr/share/elasticsearch/data
ports:
- "${ELASTIC_PORT:-9200}:9200"
environment:
- discovery.type=single-node
- xpack.security.enabled=false
- xpack.security.http.ssl.enabled=false
- xpack.security.transport.ssl.enabled=false
- xpack.security.authc.api_key.enabled=false
kibana:
image: docker.elastic.co/kibana/kibana:8.18.0
container_name: crocodile_kibana
ports:
- "${KIBANA_PORT:-5601}:5601"
environment:
- ELASTICSEARCH_HOSTS=http://elastic:9200
depends_on:
- elastic