-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
56 lines (53 loc) · 1.37 KB
/
Copy pathdocker-compose.yml
File metadata and controls
56 lines (53 loc) · 1.37 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
services:
postgres:
image: ${POSTGRES_IMAGE:-pgvector/pgvector:pg16}
container_name: opswarden-postgres
restart: always
environment:
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-CHANGE_ME}
POSTGRES_DB: opswarden
TZ: Asia/Shanghai
ports:
- "5432:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
- ./init.sql:/docker-entrypoint-initdb.d/init.sql
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 5s
timeout: 5s
retries: 5
start_period: 10s
backend:
image: opswarden-backend:latest
container_name: opswarden-backend
restart: always
env_file:
- path: .env
required: false
environment:
DATABASE_URL: postgresql+psycopg://postgres:${POSTGRES_PASSWORD:-CHANGE_ME}@postgres:5432/opswarden
HF_HUB_OFFLINE: "1"
ports:
- "8000:8000"
volumes:
- hf_cache:/root/.cache/huggingface
depends_on:
postgres:
condition: service_healthy
frontend:
build:
context: .
dockerfile: frontend/Dockerfile
args:
NODE_BASE_IMAGE: ${DOCKERHUB_NODE_IMAGE:-node:20-alpine}
NGINX_BASE_IMAGE: ${DOCKERHUB_NGINX_IMAGE:-nginx:alpine}
container_name: opswarden-frontend
restart: always
ports:
- "8080:80"
depends_on:
- backend
volumes:
postgres_data:
hf_cache: