-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
58 lines (54 loc) · 2.03 KB
/
Copy pathdocker-compose.yml
File metadata and controls
58 lines (54 loc) · 2.03 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
services:
storyspec-server:
image: node:20-alpine
working_dir: /app
command: sh -c "npm install --omit=dev --package-lock=false --ignore-scripts --no-audit --no-fund && node dist/cli.js server --host 0.0.0.0 --port ${STORYSPEC_SERVER_PORT:-4321}"
ports:
- "${STORYSPEC_SERVER_PORT:-4321}:${STORYSPEC_SERVER_PORT:-4321}"
environment:
STORYSPEC_SERVER_HOST: 0.0.0.0
STORYSPEC_SERVER_PORT: ${STORYSPEC_SERVER_PORT:-4321}
STORYSPEC_DATABASE_URL: ${STORYSPEC_DATABASE_URL:-postgres://storyspec:storyspec@postgres:5432/storyspec}
STORYSPEC_DATABASE_MIGRATE: ${STORYSPEC_DATABASE_MIGRATE:-true}
STORYSPEC_REDIS_URL: ${STORYSPEC_REDIS_URL:-redis://redis:6379}
STORYSPEC_DATA_ROOT: ${STORYSPEC_DATA_ROOT:-/data/storyspec}
STORYSPEC_SESSION_SECRET: ${STORYSPEC_SESSION_SECRET:-change-me}
volumes:
- ./:/app:ro
- storyspec-node-modules:/app/node_modules
- storyspec-data:/data/storyspec
depends_on:
- postgres
- redis
storyspec-worker:
image: node:20-alpine
working_dir: /app
command: sh -c "npm install --omit=dev --package-lock=false --ignore-scripts --no-audit --no-fund && node dist/cli.js worker"
environment:
STORYSPEC_DATABASE_URL: ${STORYSPEC_DATABASE_URL:-postgres://storyspec:storyspec@postgres:5432/storyspec}
STORYSPEC_DATABASE_MIGRATE: ${STORYSPEC_DATABASE_MIGRATE:-true}
STORYSPEC_REDIS_URL: ${STORYSPEC_REDIS_URL:-redis://redis:6379}
STORYSPEC_WORKER_CONCURRENCY: ${STORYSPEC_WORKER_CONCURRENCY:-1}
volumes:
- ./:/app:ro
- storyspec-node-modules:/app/node_modules
depends_on:
- postgres
- redis
postgres:
image: postgres:16-alpine
environment:
POSTGRES_DB: storyspec
POSTGRES_USER: storyspec
POSTGRES_PASSWORD: storyspec
volumes:
- storyspec-postgres:/var/lib/postgresql/data
redis:
image: redis:7-alpine
volumes:
- storyspec-redis:/data
volumes:
storyspec-data:
storyspec-node-modules:
storyspec-postgres:
storyspec-redis: