forked from PDFCraftTool/pdfcraft
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
46 lines (43 loc) · 1.02 KB
/
Copy pathdocker-compose.yml
File metadata and controls
46 lines (43 loc) · 1.02 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
services:
web-dev:
image: node:22-alpine
working_dir: /app
command: sh -c "npm ci && npm run dev -- --hostname 0.0.0.0 --port 3000"
ports:
- "3000:3000"
environment:
NODE_ENV: development
WATCHPACK_POLLING: "true"
CHOKIDAR_USEPOLLING: "true"
volumes:
- ./:/app
- node_modules:/app/node_modules
profiles:
- dev
builder:
image: node:22-alpine
working_dir: /app
command: sh -c "npm ci && npm run build && rm -rf /out/* && cp -r out/* /out/"
environment:
- BASE_PATH=${BASE_PATH:-}
volumes:
- ./:/app
- static_out:/out
profiles:
- prod
web:
image: nginx:1.25-alpine
ports:
- "8080:80"
volumes:
- static_out:/website/pdfcraft:ro
- ./nginx.conf:/etc/nginx/conf.d/default.conf:ro
- ./security-headers.conf:/etc/nginx/security-headers.conf:ro
depends_on:
builder:
condition: service_completed_successfully
profiles:
- prod
volumes:
node_modules:
static_out: