Repository navigation
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
65 lines (61 loc) · 1.64 KB
/
Copy pathdocker-compose.yml
File metadata and controls
65 lines (61 loc) · 1.64 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
services:
mysql:
image: mysql:8.0
environment:
MYSQL_ROOT_PASSWORD: ${DB_PASSWORD:-rootpassword}
MYSQL_DATABASE: ${DB_NAME:-cloudemu_analytics}
ports:
- "3306:3306"
volumes:
- mysql_data:/var/lib/mysql
healthcheck:
test: ["CMD", "mysqladmin", "ping", "-h", "localhost"]
interval: 5s
retries: 10
redis:
image: redis:7-alpine
command: redis-server --requirepass ${REDIS_PASSWORD:-password}
ports:
- "6379:6379"
healthcheck:
test: ["CMD", "redis-cli", "-a", "${REDIS_PASSWORD:-password}", "ping"]
interval: 5s
retries: 10
backend:
build: ./backend
ports:
- "9001:9001"
environment:
APP_NAME: cloudemu-analytics
HTTP_PORT: "9001"
METRICS_PORT: "3454"
DB_HOST: mysql
DB_PORT: "3306"
DB_USER: root
DB_PASSWORD: ${DB_PASSWORD:-rootpassword}
DB_NAME: ${DB_NAME:-cloudemu_analytics}
DB_DIALECT: mysql
REDIS_HOST: redis
REDIS_PORT: "6379"
REDIS_PASSWORD: ${REDIS_PASSWORD:-password}
# GITHUB_TOKEN is passed from host env or .env file — NEVER hardcode
GITHUB_TOKEN: ${GITHUB_TOKEN}
GITHUB_REPO: ${GITHUB_REPO:-stackshy/cloudemu}
GO_MODULE: ${GO_MODULE:-github.com/stackshy/cloudemu}
SEARCH_QUERY: ${SEARCH_QUERY:-cloudemu}
depends_on:
mysql:
condition: service_healthy
redis:
condition: service_healthy
frontend:
build:
context: ./frontend
args:
NEXT_PUBLIC_API_URL: ${NEXT_PUBLIC_API_URL:-http://localhost:9001}
ports:
- "3000:3000"
depends_on:
- backend
volumes:
mysql_data: