-
Notifications
You must be signed in to change notification settings - Fork 22
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
141 lines (133 loc) · 3.3 KB
/
Copy pathdocker-compose.yml
File metadata and controls
141 lines (133 loc) · 3.3 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
version: "3.8"
networks:
app-network:
driver: bridge
services:
postgres:
image: postgres:14-alpine
networks:
- app-network
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
- POSTGRES_MULTIPLE_DATABASES=nocodb,n8n
ports:
- "5432:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
- ./init-databases.sh:/docker-entrypoint-initdb.d/init-databases.sh
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 10s
timeout: 5s
retries: 5
nocodb:
image: nocodb/nocodb:latest
networks:
- app-network
ports:
- "8080:8080"
environment:
- NC_DB=pg://postgres:5432?u=postgres&p=postgres&d=nocodb
- NC_AUTH_JWT_SECRET=your-secret-key-change-this
- NC_PUBLIC_URL=http://localhost:8080
volumes:
- nocodb_data:/usr/app/data
depends_on:
postgres:
condition: service_healthy
restart: unless-stopped
n8n:
image: n8nio/n8n:latest
networks:
- app-network
ports:
- "5678:5678"
environment:
- DB_TYPE=postgresdb
- DB_POSTGRESDB_DATABASE=n8n
- DB_POSTGRESDB_HOST=postgres
- DB_POSTGRESDB_PORT=5432
- DB_POSTGRESDB_USER=postgres
- DB_POSTGRESDB_PASSWORD=postgres
- N8N_HOST=${N8N_HOST:-localhost}
- N8N_PORT=5678
- N8N_PROTOCOL=http
- N8N_USER_FOLDER=/home/node/.n8n
- WEBHOOK_URL=http://localhost:5678/
- GENERIC_TIMEZONE=${GENERIC_TIMEZONE:-UTC}
volumes:
- n8n_data:/home/node/.n8n
- ./videos:/home/node/.n8n/videos
depends_on:
postgres:
condition: service_healthy
restart: unless-stopped
minio:
image: minio/minio:latest
networks:
- app-network
ports:
- "9000:9000"
- "9001:9001"
environment:
- MINIO_ROOT_USER=minioadmin
- MINIO_ROOT_PASSWORD=minioadmin
volumes:
- minio_data:/data
command: server /data --console-address ":9001"
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"]
interval: 30s
timeout: 20s
retries: 3
restart: unless-stopped
createbuckets:
image: minio/mc
networks:
- app-network
depends_on:
minio:
condition: service_started
entrypoint: >
/bin/sh -c "
sleep 10;
/usr/bin/mc alias set myminio http://minio:9000 minioadmin minioadmin;
/usr/bin/mc mb myminio/assets || true;
/usr/bin/mc mb myminio/output || true;
exit 0;
"
api:
build:
context: ./api
dockerfile: Dockerfile
networks:
- app-network
ports:
- "9999:5000"
environment:
- NOCODB_URL=http://nocodb:8080
- NOCODB_TOKEN=${NOCODB_TOKEN}
- OPENAI_API_KEY=${OPENAI_API_KEY}
- MINIO_ACCESS_KEY=minioadmin
- MINIO_SECRET_KEY=minioadmin
- MINIO_ENDPOINT=http://minio:9000
volumes:
- ./api:/app
- ./logs:/app/logs
depends_on:
nocodb:
condition: service_started
minio:
condition: service_healthy
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:5000/health || exit 1"]
interval: 30s
timeout: 30s
retries: 3
restart: unless-stopped
volumes:
postgres_data:
nocodb_data:
n8n_data:
minio_data: