-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yaml
More file actions
39 lines (37 loc) · 1.04 KB
/
docker-compose.yaml
File metadata and controls
39 lines (37 loc) · 1.04 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
services:
# Development service - builds and serves the site with hot reload capability
dev:
build:
context: ..
dockerfile: docker/Dockerfile
target: development
ports:
- "8000:8000"
volumes:
# Mount source code for live editing
- ../src:/app/src
- ../content:/app/content
- ../assets:/app/assets
- ../config:/app/config
- ../scripts:/app/scripts
- ../src/docker-server.ts:/app/docker-server.ts
# Mount build outputs (allows seeing built files)
- ../_site:/app/_site
- ../build:/app/build
# Use named volume for Deno cache to speed up rebuilds
- deno_cache:/deno-dir
environment:
- DENO_DIR=/deno-dir
command: >
sh -c "deno task build && deno run --allow-net --allow-read --allow-env docker-server.ts"
# Production service - serves pre-built static site
prod:
build:
context: ..
dockerfile: docker/Dockerfile
target: production
ports:
- "8080:8000"
restart: unless-stopped
volumes:
deno_cache: