Repository navigation
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
97 lines (88 loc) · 2.09 KB
/
Copy pathdocker-compose.yml
File metadata and controls
97 lines (88 loc) · 2.09 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
88
89
90
91
92
93
94
95
96
97
version: "3.8"
services:
postgres:
image: postgres:15-alpine
environment:
POSTGRES_USER: aistudio
POSTGRES_PASSWORD: aistudio
POSTGRES_DB: aistudio
ports:
- "5433:5432"
volumes:
- pgdata:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U aistudio"]
interval: 5s
timeout: 3s
retries: 5
rabbitmq:
image: rabbitmq:3.13-management-alpine
environment:
RABBITMQ_DEFAULT_USER: aistudio
RABBITMQ_DEFAULT_PASS: aistudio
ports:
- "5672:5672"
- "15672:15672"
healthcheck:
test: ["CMD", "rabbitmq-diagnostics", "-q", "ping"]
interval: 10s
timeout: 5s
retries: 5
api:
build: .
command: uvicorn app.main:app --host 0.0.0.0 --port 8001 --reload
ports:
- "8002:8001"
env_file: .env
environment:
POSTGRES_HOST: postgres
RABBITMQ_URL: rabbitmq
volumes:
- .:/AIStudio
- ${SSH_KEY_PATH:-~/.ssh/id_rsa}:/root/.ssh/id_rsa:ro
depends_on:
postgres:
condition: service_healthy
rabbitmq:
condition: service_healthy
worker:
build: .
command: celery -A app.worker:celery_app worker --loglevel=info --concurrency=2 -Q celery
env_file: .env
environment:
POSTGRES_HOST: postgres
RABBITMQ_URL: rabbitmq
volumes:
- .:/AIStudio
- ${SSH_KEY_PATH:-~/.ssh/id_rsa}:/root/.ssh/id_rsa:ro
- jupyter-locations:/etc/nginx/jupyter-locations
depends_on:
postgres:
condition: service_healthy
rabbitmq:
condition: service_healthy
nginx:
build: ./nginx
ports:
- "8443:8443"
volumes:
- jupyter-locations:/etc/nginx/jupyter-locations
restart: unless-stopped
depends_on:
- api
pgadmin:
image: dpage/pgadmin4
ports:
- "5050:80"
environment:
PGADMIN_DEFAULT_EMAIL: admin@admin.com
PGADMIN_DEFAULT_PASSWORD: admin
demo-ui:
image: nginx:alpine
ports:
- "3000:80"
volumes:
- ./demo-ui:/usr/share/nginx/html:ro
volumes:
pgdata:
jupyter-locations: