-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
55 lines (52 loc) · 1.38 KB
/
docker-compose.yml
File metadata and controls
55 lines (52 loc) · 1.38 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
services:
postgres:
image: postgres:16
container_name: codevault-db
restart: unless-stopped
environment:
POSTGRES_PASSWORD: securepass123!
POSTGRES_USER: codevault-user
POSTGRES_DB: code_vault
volumes:
- postgres-data:/var/lib/postgresql/data
- ./init-scripts:/docker-entrypoint-initdb.d
ports:
- "5432:5432"
networks:
- codevault-network
healthcheck:
test: ["CMD-SHELL", "pg_isready -U codevault-user -d code_vault"]
interval: 10s
timeout: 5s
retries: 5
command: >
bash -c "
apt-get update &&
apt-get install -y postgresql-16-pgvector &&
docker-entrypoint.sh postgres
"
codevault:
build:
context: .
dockerfile: Dockerfile
container_name: codevault-web
restart: unless-stopped
depends_on:
postgres:
condition: service_healthy
environment:
- ASPNETCORE_ENVIRONMENT=Development
- OpenAI__ApiKey=${OPENAI_API_KEY}
- ConnectionStrings__DefaultConnection=Host=postgres;Port=5432;Database=code_vault;Username=codevault-user;Password=securepass123!
ports:
- "8080:8080"
- "8081:8081"
volumes:
- ./wwwroot:/app/wwwroot
networks:
- codevault-network
networks:
codevault-network:
driver: bridge
volumes:
postgres-data: