forked from pagopa/io-functions-lollipop
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
93 lines (84 loc) · 2.49 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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
version: "3.2"
services:
functions:
image: functions-template:v2.0.0
build:
context: ./
dockerfile: docker/functions/Dockerfile
env_file:
- .env
environment:
- languageWorkers__node__arguments=--inspect=0.0.0.0:5858
working_dir: /usr/src/app
ports:
- "7071:7071"
- "5858:5858"
networks:
- io-fn
depends_on:
- fnstorage
volumes:
- .:/usr/src/app
labels:
- "traefik.enable=true"
- "traefik.http.routers.functions.rule=Host(`localhost`)"
- "traefik.http.routers.functions.entrypoints=web"
- "traefik.http.services.functions.loadbalancer.server.port=7071"
- "traefik.http.middlewares.testHeader.headers.customrequestheaders.x-user-id=unused"
- "traefik.http.middlewares.testHeader.headers.customrequestheaders.x-user-groups=${REQ_USER_GROUPS}"
- "traefik.http.middlewares.testHeader.headers.customrequestheaders.x-subscription-id=${REQ_SERVICE_ID}"
- "traefik.http.middlewares.testHeader.headers.customrequestheaders.x-user-email=${SERVICE_EMAIL}"
- "traefik.http.middlewares.testHeader.headers.customrequestheaders.x-user-note=unused"
- "traefik.http.middlewares.testHeader.headers.customrequestheaders.x-functions-key=unused"
# apply middleware to route
- "traefik.http.routers.functions.middlewares=testHeader"
fnstorage:
image: mcr.microsoft.com/azure-storage/azurite:3.9.0
ports:
- "10000:10000"
- "10001:10001"
- "10002:10002"
networks:
- io-fn
storage:
image: mcr.microsoft.com/azure-storage/azurite:3.9.0
command: ["sh", "-c", "node bin/azurite -l /opt/azurite/folder --blobPort 10003 --queuePort 10004 --tablePort 10005"]
ports:
- "10003:10003"
- "10004:10004"
- "10005:10005"
depends_on:
- fnstorage
networks:
- io-fn
cosmosdb:
image: cosmosdb
env_file:
- .env
build:
context: ./
dockerfile: docker/cosmosdb/Dockerfile
ports:
- ${COSMOSDB_PORT}:3000
networks:
- io-fn
traefik:
image: traefik:v2.0
command: |-
--entrypoints.web.address=:80
--providers.docker=true
--providers.docker.network=io-fn
--log.level=ERROR
env_file:
- .env
ports:
- ${API_GATEWAY_PORT}:${API_GATEWAY_PORT}
networks:
- io-fn
volumes:
- /var/run/docker.sock:/var/run/docker.sock
networks:
io-fn:
driver: bridge
driver_opts:
com.docker.network.driver.mtu: 1450