-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
135 lines (127 loc) · 2.87 KB
/
Copy pathdocker-compose.yml
File metadata and controls
135 lines (127 loc) · 2.87 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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
version: '3.9'
services:
# Development environment
svger-dev:
build:
context: .
dockerfile: Dockerfile
target: builder
container_name: svger-cli-dev
volumes:
# Mount source code for development
- ./src:/app/src:cached
- ./tests:/app/tests:cached
- ./bin:/app/bin:cached
# Mount workspace for SVG processing
- ./workspace/input:/workspace/input:rw
- ./workspace/output:/workspace/output:rw
# Node modules volume for better performance
- node_modules:/app/node_modules
environment:
- NODE_ENV=development
- DEBUG=svger:*
working_dir: /app
command: npm run dev
networks:
- svger-network
restart: unless-stopped
# Production-like environment for testing
svger-prod:
build:
context: .
dockerfile: Dockerfile
container_name: svger-cli-prod
volumes:
- ./workspace/input:/workspace/input:ro
- ./workspace/output:/workspace/output:rw
environment:
- NODE_ENV=production
working_dir: /workspace
networks:
- svger-network
profiles:
- production
# Testing environment
svger-test:
build:
context: .
dockerfile: Dockerfile
target: builder
container_name: svger-cli-test
volumes:
- ./src:/app/src:cached
- ./tests:/app/tests:cached
- ./coverage:/app/coverage:rw
- node_modules:/app/node_modules
environment:
- NODE_ENV=test
- CI=true
working_dir: /app
command: npm run test:coverage
networks:
- svger-network
profiles:
- test
# Watch mode for development
svger-watch:
build:
context: .
dockerfile: Dockerfile
target: builder
container_name: svger-cli-watch
volumes:
- ./src:/app/src:cached
- ./dist:/app/dist:rw
- node_modules:/app/node_modules
environment:
- NODE_ENV=development
working_dir: /app
command: npm run build:watch
networks:
- svger-network
profiles:
- watch
# CI/CD simulation environment
svger-ci:
build:
context: .
dockerfile: Dockerfile
target: builder
container_name: svger-cli-ci
volumes:
- ./:/app:cached
- node_modules:/app/node_modules
environment:
- NODE_ENV=test
- CI=true
working_dir: /app
command: >
sh -c "
npm run lint &&
npm run typecheck &&
npm run build &&
npm run test
"
networks:
- svger-network
profiles:
- ci
# Documentation server
docs:
image: nginx:alpine
container_name: svger-cli-docs
volumes:
- ./docs:/usr/share/nginx/html:ro
- ./nginx.conf:/etc/nginx/nginx.conf:ro
ports:
- "8080:80"
networks:
- svger-network
profiles:
- docs
volumes:
node_modules:
driver: local
networks:
svger-network:
driver: bridge