-
-
Notifications
You must be signed in to change notification settings - Fork 11
/
docker-compose.yml
78 lines (73 loc) · 2.54 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
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
version: '3.7'
services:
multiplexer:
image: object_cut_multiplexer
build: multiplexer
env_file:
- .env
expose:
- 80
volumes:
- '/tmp:/tmp'
- '/var/run/docker.sock:/var/run/docker.sock:ro'
networks:
- object_cut
restart: always
labels:
- 'traefik.enable=true'
- 'traefik.docker.network=object_cut'
- 'traefik.http.routers.multiplexer.entrypoints=http'
- 'traefik.http.routers.multiplexer.rule=Host(`api.objectcut.com`)'
- 'traefik.http.routers.multiplexer-secure.tls=true'
- 'traefik.http.routers.multiplexer-secure.entrypoints=https'
- 'traefik.http.routers.multiplexer-secure.rule=Host(`api.objectcut.com`)'
- 'traefik.http.routers.multiplexer-secure.tls.certresolver=lets-encr'
- 'traefik.http.services.multiplexer.loadbalancer.server.port=80'
- 'traefik.http.services.multiplexer.loadbalancer.healthcheck.path=/stillalive'
- 'traefik.http.services.multiplexer.loadbalancer.healthcheck.interval=30s'
- 'traefik.http.services.multiplexer.loadbalancer.healthcheck.timeout=10s'
- 'traefik.http.services.multiplexer.loadbalancer.healthcheck.hostname=api.objectcut.com'
inference:
image: object_cut_inference
build: inference
env_file:
- .env
expose:
- 80
volumes:
- '/tmp:/tmp'
- '/var/run/docker.sock:/var/run/docker.sock:ro'
networks:
- object_cut
restart: always
environment:
- MODEL=U2NETP # Can also be `BASNet`, `U2NET` or `U2NETPORTRAIT`
labels:
- 'traefik.enable=true'
- 'traefik.docker.network=object_cut'
- 'traefik.http.routers.inference.entrypoints=http'
- 'traefik.http.routers.inference.rule=Host(`inference`)'
- 'traefik.http.services.inference.loadbalancer.server.port=80'
- 'traefik.http.services.inference.loadbalancer.healthcheck.path=/stillalive'
- 'traefik.http.services.inference.loadbalancer.healthcheck.interval=30s'
- 'traefik.http.services.inference.loadbalancer.healthcheck.timeout=10s'
- 'traefik.http.services.inference.loadbalancer.healthcheck.hostname=inference'
traefik:
container_name: object_cut_router
image: traefik:v2.1
ports:
- 80:80
- 443:443
volumes:
- '/var/run/docker.sock:/var/run/docker.sock:ro'
- './traefik/traefik.yml:/traefik.yml:ro'
- './traefik/acme.json:/acme.json'
networks:
- object_cut
restart: always
labels:
- 'traefik.enable=false'
networks:
object_cut:
name: object_cut
driver: bridge