-
-
Notifications
You must be signed in to change notification settings - Fork 36
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
125 lines (117 loc) · 2.73 KB
/
docker-compose.yml
File metadata and controls
125 lines (117 loc) · 2.73 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
version: '3.8'
services:
# Node.js Backend API
backend:
build:
context: ./backend
dockerfile: Dockerfile
ports:
- "8080:8080"
env_file:
- ./backend/.env.dist.local
environment:
- NODE_ENV=development
- PORT=8080
- CUBEJS_URL=http://cubejs:4000
- CUBEJS_JWT_SECRET=137ea167812145c6d77452a58d7dd29b
- CUBEJS_JWT_EXPIRY=2h
depends_on:
- postgres
- redis
- cubejs
healthcheck:
test: [ "CMD", "curl", "-f", "http://localhost:8080/health" ]
interval: 30s
timeout: 10s
retries: 3
networks:
- devspace-network
# Vue.js Frontend
frontend:
build:
context: ./frontend
dockerfile: Dockerfile.dev
ports:
- "8081:8081"
environment:
- NODE_ENV=development
- VUE_APP_BACKEND_URL=http://localhost:8080
- BACKEND_URL=http://backend:8080
- VITE_WS_URL=ws://localhost:8081
- VUE_APP_NANGO_PUBLIC_KEY=bd44889e-3c6d-48b9-9a32-75df76e561b6
- VUE_APP_CUBEJS_URL=http://localhost:4000
depends_on:
- backend
networks:
- devspace-network
# PostgreSQL Database
postgres:
image: postgres:15-alpine
ports:
- "5432:5432"
env_file:
- ./backend/.env.dist.local
volumes:
- postgres_data:/var/lib/postgresql/data
healthcheck:
test: [ "CMD-SHELL", "pg_isready -U devspace" ]
interval: 10s
timeout: 5s
retries: 5
networks:
- devspace-network
# Redis Cache
redis:
image: redis:7-alpine
ports:
- "6379:6379"
volumes:
- redis_data:/data
healthcheck:
test: [ "CMD", "redis-cli", "ping" ]
interval: 10s
timeout: 5s
retries: 5
networks:
- devspace-network
# CubeJS Analytics
cubejs:
image: cubejs/cube
restart: always
ports:
- "4000:4000"
- "3001:3000"
volumes:
- "./services/libs/cubejs:/cube/conf"
env_file:
- ./backend/.env.dist.local
environment:
- CUBEJS_DEV_MODE=true
- CUBEJS_DB_HOST=postgres
- CUBEJS_DB_PORT=5432
- CUBEJS_DB_TYPE=postgres
- CUBEJS_API_SECRET=137ea167812145c6d77452a58d7dd29b
- CUBEJS_EXTERNAL_DEFAULT=true
- CUBEJS_SCHEDULED_REFRESH_DEFAULT=true
depends_on:
postgres:
condition: service_healthy
healthcheck:
test:
[
"CMD",
"node",
"-e",
"require('http').get('http://localhost:4000/readyz', r => process.exit(r.statusCode === 200 ? 0 : 1)).on('error', () => process.exit(1))",
]
interval: 30s
timeout: 10s
retries: 5
networks:
- devspace-network
networks:
devspace-network:
driver: bridge
volumes:
postgres_data:
redis_data: