-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.dev.yml
More file actions
138 lines (132 loc) · 4.33 KB
/
docker-compose.dev.yml
File metadata and controls
138 lines (132 loc) · 4.33 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
services:
dev:
image: oven/bun:1
working_dir: /workspace
command: ["bun", "run", "dev"]
environment:
DATABASE_URL: ${DATABASE_URL:-postgresql://mdcms:mdcms@postgres:5432/mdcms}
REDIS_URL: ${REDIS_URL:-redis://redis:6379}
S3_ENDPOINT: ${S3_ENDPOINT:-http://minio:9000}
S3_ACCESS_KEY: ${S3_ACCESS_KEY:-minioadmin}
S3_SECRET_KEY: ${S3_SECRET_KEY:-minioadmin}
S3_BUCKET: ${S3_BUCKET:-mdcms-media}
SMTP_HOST: ${SMTP_HOST:-mailhog}
SMTP_PORT: ${SMTP_PORT:-1025}
NODE_ENV: ${NODE_ENV:-development}
LOG_LEVEL: ${LOG_LEVEL:-info}
APP_VERSION: ${APP_VERSION:-0.0.0}
PORT: ${PORT:-4000}
SERVICE_NAME: ${SERVICE_NAME:-mdcms-server}
MDCMS_STUDIO_EXAMPLE_HOST: ${MDCMS_STUDIO_EXAMPLE_HOST:-0.0.0.0}
MDCMS_STUDIO_EXAMPLE_PORT: ${MDCMS_STUDIO_EXAMPLE_PORT:-4173}
MDCMS_STUDIO_ALLOWED_ORIGINS: ${MDCMS_STUDIO_ALLOWED_ORIGINS:-http://localhost:4173,http://127.0.0.1:4173}
MDCMS_AUTH_INSECURE_COOKIES: ${MDCMS_AUTH_INSECURE_COOKIES:-true}
NEXT_TELEMETRY_DISABLED: "1"
WATCHPACK_POLLING: "true"
MDCMS_DEMO_API_KEY: ${MDCMS_DEMO_API_KEY:-mdcms_key_demo_local_compose_seed_2026_read}
ports:
- "4000:4000"
- "4173:4173"
volumes:
- .:/workspace
- workspace_node_modules:/workspace/node_modules
- bun_cache:/root/.bun/install/cache
depends_on:
db-migrate:
condition: service_completed_successfully
postgres:
condition: service_healthy
redis:
condition: service_healthy
minio:
condition: service_healthy
mailhog:
condition: service_healthy
db-migrate:
image: oven/bun:1
working_dir: /workspace
command:
[
"sh",
"-lc",
"bun install --frozen-lockfile && bun run --cwd apps/server db:migrate && MDCMS_DEMO_ENVIRONMENT=staging bun run --cwd apps/server demo:seed && MDCMS_DEMO_ENVIRONMENT=production bun run --cwd apps/server demo:seed",
]
environment:
DATABASE_URL: ${DATABASE_URL:-postgresql://mdcms:mdcms@postgres:5432/mdcms}
NODE_ENV: ${NODE_ENV:-development}
LOG_LEVEL: ${LOG_LEVEL:-info}
APP_VERSION: ${APP_VERSION:-0.0.0}
MDCMS_DEMO_API_KEY: ${MDCMS_DEMO_API_KEY:-mdcms_key_demo_local_compose_seed_2026_read}
MDCMS_DEMO_PROJECT: ${MDCMS_DEMO_PROJECT:-marketing-site}
MDCMS_DEMO_ENVIRONMENT: ${MDCMS_DEMO_ENVIRONMENT:-staging}
MDCMS_DEMO_SEED_USER_EMAIL: ${MDCMS_DEMO_SEED_USER_EMAIL:-demo@mdcms.local}
MDCMS_DEMO_SEED_USER_NAME: ${MDCMS_DEMO_SEED_USER_NAME:-Demo User}
MDCMS_DEMO_SEED_USER_PASSWORD: ${MDCMS_DEMO_SEED_USER_PASSWORD:-Demo12345!}
volumes:
- .:/workspace
- workspace_node_modules:/workspace/node_modules
- bun_cache:/root/.bun/install/cache
depends_on:
postgres:
condition: service_healthy
postgres:
image: postgres:16
restart: unless-stopped
environment:
POSTGRES_USER: ${POSTGRES_USER:-mdcms}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-mdcms}
POSTGRES_DB: ${POSTGRES_DB:-mdcms}
ports:
- "5432:5432"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U mdcms -d mdcms"]
interval: 10s
timeout: 5s
retries: 8
volumes:
- pgdata:/var/lib/postgresql/data
redis:
image: redis:7-alpine
restart: unless-stopped
command: ["redis-server", "--save", "60", "1", "--appendonly", "yes"]
ports:
- "6379:6379"
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 3s
retries: 8
minio:
image: minio/minio
restart: unless-stopped
command: server /data --console-address ":9001"
environment:
MINIO_ROOT_USER: ${MINIO_ROOT_USER:-minioadmin}
MINIO_ROOT_PASSWORD: ${MINIO_ROOT_PASSWORD:-minioadmin}
ports:
- "9000:9000"
- "9001:9001"
volumes:
- miniodata:/data
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"]
interval: 10s
timeout: 5s
retries: 8
mailhog:
image: mailhog/mailhog
restart: unless-stopped
ports:
- "1025:1025"
- "8025:8025"
healthcheck:
test:
["CMD-SHELL", "wget --spider --quiet http://127.0.0.1:8025/ || exit 1"]
interval: 10s
timeout: 5s
retries: 8
volumes:
pgdata:
miniodata:
workspace_node_modules:
bun_cache: