-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose-prod.yaml
53 lines (49 loc) · 1.03 KB
/
docker-compose-prod.yaml
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
version: '3'
services:
fastapi:
build: src
container_name: fastapi_service
restart: always
env_file:
- .env
depends_on:
elastic:
condition: service_healthy
redis:
condition: service_started
expose:
- "8000"
nginx:
image: nginx:latest
container_name: nginx
restart: on-failure
privileged: true
volumes:
- ./nginx/nginx.conf:/etc/nginx/nginx.conf:ro
- ./nginx/conf.d:/etc/nginx/conf.d:ro
depends_on:
- fastapi
ports:
- "80:80"
redis:
image: redis:latest
container_name: redis_cache
restart: always
expose:
- "6379"
elastic:
image: elasticsearch:8.6.2
healthcheck:
test: curl -f 127.0.0.1:9200 || exit 1
interval: 10s
timeout: 10s
environment:
- discovery.type=single-node
- xpack.security.enabled=false
- "ES_JAVA_OPTS=-Xms1000m -Xmx1000m"
volumes:
- elastic-data:/usr/share/elasticsearch/data
expose:
- "9200"
volumes:
elastic-data: