-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
52 lines (48 loc) · 1.56 KB
/
docker-compose.yml
File metadata and controls
52 lines (48 loc) · 1.56 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
services:
app-dev:
build:
context: .
dockerfile: Dockerfile
target: base
args:
TARGETARCH: ${TARGETARCH:-arm64} # Default to arm64, override via env var
ports:
- "3000:3000" # Application server
- "9229:9229" # Node.js debug port
volumes:
# Bind mount project files (editable on Windows host)
- .:/usr/src/app
- /usr/src/app/node_modules # Prevent overwriting container node_modules
# Share host development tools and configs
- ~/.gitconfig:/root/.gitconfig:ro # Git configuration
- ~/.ssh:/root/.ssh:ro # SSH keys for git operations
- ~/.github:/root/.github:ro # GitHub CLI configuration
- vscode-server:/root/.vscode-server # VS Code server data persistence
environment:
- NODE_ENV=development
- DEBUG=*
secrets:
- github_token
- gh_token
# Keep container running for Dev Containers (VS Code will manage commands)
command: sleep infinity
stdin_open: true # Required for interactive development
tty: true # Required for proper terminal experience
app-prod:
build:
context: .
dockerfile: Dockerfile
target: production
args:
TARGETARCH: ${TARGETARCH:-arm64} # Default to arm64, override via env var
ports:
- "3000:3000"
environment:
- NODE_ENV=production
volumes:
vscode-server: # Persistent VS Code server data
secrets:
github_token:
file: ./secrets/github_token.txt
gh_token:
file: ./secrets/gh_token.txt