-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
41 lines (39 loc) · 1.08 KB
/
docker-compose.yml
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
version: '3.0'
services:
task:
build:
context: . # build上下文地址
dockerfile: ./task/Dockerfile # 使用的dockerfile构建文件
cache_from: # 使用缓存加速构建速度
- zero:base
- type=local,src=path/to/cache
- type=gha
image: task
container_name: task
restart: always
command: ./task -f /app/etc/task.yaml
privileged: true
ports:
- "8081:8888"
volumes:
- ${ProjectPath}/task/etc:/app/etc
my-zero:
env_file: # 这个是默认的,不写也是这个
- .env
build:
context: . # build上下文地址
dockerfile: ./my_zero/Dockerfile # 使用的dockerfile构建文件
cache_from: # 使用缓存加速构建速度
- zero:base
- type=local,src=path/to/cache
- type=gha
image: my-zero:${Tag}
container_name: my-zero
restart: always
command: ./my-zero -f /app/etc/my-zero.${Env}.yaml
privileged: true
volumes:
- ${ProjectPath}/my_zero/etc:/app/etc
ports:
- "80:8888"
- "10010:10010" # 普罗米修斯接口