forked from vivek7405/webjs
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcompose.yaml
More file actions
52 lines (49 loc) · 1.63 KB
/
compose.yaml
File metadata and controls
52 lines (49 loc) · 1.63 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
# docker compose — runs website + docs + blog as three services from a
# single image. Local parity with Railway deployment (same Dockerfile).
#
# docker compose up --build
# website → http://localhost:15000
# docs → http://localhost:14000
# blog → http://localhost:13000
services:
website:
image: webjs
build: .
working_dir: /app/website
# @webjskit/cli installed in the root node_modules/.bin by npm workspaces;
# invoke its binary directly rather than via `npx webjs`.
command: ["node", "/app/node_modules/@webjskit/cli/bin/webjs.js", "start", "--port", "5000"]
ports:
- "15000:5000"
environment:
DOCS_URL: ${DOCS_URL:-http://localhost:14000}
BLOG_URL: ${BLOG_URL:-http://localhost:13000}
docs:
image: webjs
build: .
working_dir: /app/docs
command: ["node", "/app/node_modules/@webjskit/cli/bin/webjs.js", "start", "--port", "4000"]
ports:
- "14000:4000"
blog:
image: webjs
build: .
working_dir: /app/examples/blog
# Apply migrations, then start. `migrate deploy` is idempotent; a
# second boot on an already-migrated DB is a quick no-op.
command:
- sh
- -c
- |
node /app/node_modules/prisma/build/index.js migrate deploy && \
node /app/node_modules/@webjskit/cli/bin/webjs.js start --port 3000
ports:
- "13000:3000"
environment:
DATABASE_URL: file:/data/dev.db
AUTH_SECRET: ${AUTH_SECRET:-change-me-at-least-32-characters-long!}
SESSION_SECRET: ${SESSION_SECRET:-change-me-at-least-32-characters-long!}
volumes:
- blog-data:/data
volumes:
blog-data: