-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
155 lines (145 loc) · 3.1 KB
/
Copy pathdocker-compose.yml
File metadata and controls
155 lines (145 loc) · 3.1 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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
version: "3.9"
services:
app:
build:
context: .
dockerfile: docker/Dockerfile
container_name: mage-app
hostname: app
env_file:
- .env.docker
depends_on:
- api
- mage-api
ports:
- "${FRONTEND_PORT:-8080}:8080"
networks:
mage:
aliases:
- app.localhost
test:
build:
context: .
dockerfile: docker/Dockerfile
container_name: mage-app-test
hostname: test
working_dir: /app
volumes:
- ./:/app
- /app/node_modules
entrypoint: ["/bin/sh", "-c"]
command: ["sleep infinity"]
profiles:
- test
api:
build:
context: .
dockerfile: docker/Dockerfile.api
container_name: mage-api-helper
hostname: api
env_file:
- .env.docker
environment:
PORT: ${API_PORT:-3000}
COMFY_HOST: ${COMFY_HOST:-ffmpeg-worker}
depends_on:
- ffmpeg-worker
expose:
- "3000"
networks:
mage:
aliases:
- api.localhost
mage-api:
image: ${MAGE_API_IMAGE:-ghcr.io/mage-ai/mage-api:latest}
container_name: mage-api
hostname: mage-api
env_file:
- .env.docker
environment:
APP_ENV: local
APP_DEBUG: 'true'
APP_URL: http://localhost/mage-api
DB_HOST: mysql
DB_PORT: 3306
DB_DATABASE: ${MYSQL_DATABASE:-mage}
DB_USERNAME: ${MYSQL_USER:-mage}
DB_PASSWORD: ${MYSQL_PASSWORD:-secret}
QUEUE_CONNECTION: sync
depends_on:
- mysql
expose:
- "47860"
networks:
mage:
aliases:
- mage-api.localhost
mysql:
image: mysql:8.0
container_name: mage-mysql
hostname: mysql
environment:
MYSQL_DATABASE: ${MYSQL_DATABASE:-mage}
MYSQL_USER: ${MYSQL_USER:-mage}
MYSQL_PASSWORD: ${MYSQL_PASSWORD:-secret}
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD:-rootsecret}
ports:
- "${MYSQL_PORT:-3306}:3306"
volumes:
- mysql_data:/var/lib/mysql
networks:
mage:
aliases:
- mysql.localhost
nginx:
image: nginx:1.25
container_name: mage-nginx
hostname: gateway
depends_on:
- app
- api
- mage-api
ports:
- "${NGINX_PORT:-80}:80"
volumes:
- ./docker/nginx.conf:/etc/nginx/nginx.conf:ro
networks:
mage:
aliases:
- gateway.localhost
ffmpeg-worker:
image: jrottenberg/ffmpeg:5.1-ubuntu
command: ["sleep", "infinity"]
networks:
mage:
aliases:
- ffmpeg.localhost
ollama:
image: ollama/ollama:latest
container_name: mage-ollama
hostname: ollama
environment:
OLLAMA_HOST: 0.0.0.0
OLLAMA_NUM_PARALLEL: 1
OLLAMA_MAX_LOADED_MODELS: 1
ports:
- "${OLLAMA_PORT:-11434}:11434"
volumes:
- ollama_data:/root/.ollama
deploy:
resources:
reservations:
devices:
- driver: nvidia
count: 1
capabilities: [gpu]
networks:
mage:
aliases:
- ollama.localhost
networks:
mage:
driver: bridge
volumes:
mysql_data:
ollama_data: