-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathdocker-compose.yaml
37 lines (33 loc) · 1.08 KB
/
docker-compose.yaml
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
version: '3.0'
services:
hlz-go:
image: golang:1.16
container_name: puppeteer-go-app
working_dir: /app
restart: always
volumes:
- ./:/app:cached
- /tmp/comic_api:/tmp/comic_api:cached
ports:
- 8100:8100
environment:
TZ: Asia/Shanghai
GO111MODULE: "on"
GOPROXY: https://goproxy.io
TERM: xterm
networks:
default:
ipv4_address: 172.38.0.2
command: bash -c "mkdir -p /tmp/comic_api && cd /app && make cr"
deploy: # cgroups 部署资源限制
resources:
limits: # cpu最大使用数
cpus: "0.3" # 该服务cpu资源可用百分比,单个cpu打满就是 100%, 这里的 1.0 就是 100% 的 意思
memory: 200M
#reservations: # cpu最小使用数 --- 只能在 swarm 中用
#cpus: '0.2'
#memory: 200M
networks:
default:
external:
name: network_puppeteer_go