-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
41 lines (38 loc) · 1 KB
/
Copy pathdocker-compose.yml
File metadata and controls
41 lines (38 loc) · 1 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
version: '3.8'
services:
gm-sm2-cipher:
build:
context: .
dockerfile: Dockerfile
image: gm-sm2-cipher:latest
container_name: gm-sm2-cipher
working_dir: /app
volumes:
# Mount source code for development (optional)
- ./src:/app/src:ro
- ./example.js:/app/example.js:ro
# Mount built lib if you want to test without rebuilding
- ./lib:/app/lib:rw
environment:
- NODE_ENV=production
# Keep container running for interactive use
stdin_open: true
tty: true
# Override default command to keep container running
command: tail -f /dev/null
# Service for running the example
gm-sm2-cipher-example:
build:
context: .
dockerfile: Dockerfile
image: gm-sm2-cipher:latest
container_name: gm-sm2-cipher-example
working_dir: /app
volumes:
- ./example.js:/app/example.js:ro
- ./lib:/app/lib:ro
environment:
- NODE_ENV=production
command: node example.js
profiles:
- example