-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
87 lines (80 loc) · 1.94 KB
/
docker-compose.yml
File metadata and controls
87 lines (80 loc) · 1.94 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
version: "3.9"
services:
api:
build:
context: .
dockerfile: crates/api/Dockerfile
image: deepersensor/api:dev
env_file:
- ./.env
environment:
- APP_ENV=production
- DATABASE_URL=postgres://postgres:postgres@postgres:5432/deepersensor
expose:
- "8080"
healthcheck:
test: ["CMD-SHELL", "wget -q -O /dev/null http://localhost:8080/health || exit 1"]
interval: 30s
timeout: 3s
retries: 3
depends_on:
- postgres
- redis
- ollama
restart: unless-stopped
postgres:
image: postgres:16-alpine
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
- POSTGRES_DB=deepersensor
expose:
- "5432"
volumes:
- postgres_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 5s
timeout: 5s
retries: 5
restart: unless-stopped
redis:
image: redis:7-alpine
command: ["redis-server", "--save", "", "--appendonly", "no", "--requirepass", "${REDIS_PASSWORD:-changeme}" ]
expose:
- "6379"
restart: unless-stopped
ollama:
image: ollama/ollama:latest
volumes:
- ollama_models:/root/.ollama
expose:
- "11434"
restart: unless-stopped
# nginx:
# build:
# context: .
# dockerfile: nginx/Dockerfile
# image: deepersensor/nginx:dev
# depends_on:
# - api
# ports:
# - "80:80"
# restart: unless-stopped
# environment:
# - NGINX_ENVSUBST_OUTPUT_DIR=/etc/nginx
nginx:
build:
context: .
dockerfile: nginx/Dockerfile
image: deepersensor/nginx:dev
depends_on:
- api
ports:
- "127.0.0.1:8181:80" # <-- SOLUTION: Expose port 80 internally on host port 8181.
restart: unless-stopped
environment:
- NGINX_ENVSUBST_OUTPUT_DIR=/etc/nginx
volumes:
postgres_data: {}
ollama_models: {}