generated from CDCgov/template
-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
110 lines (105 loc) · 4.9 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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
version: "3.7"
services:
rs-sftp-ingestion-service:
build: .
environment:
AZURE_STORAGE_CONNECTION_STRING: DefaultEndpointsProtocol=http;AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;BlobEndpoint=http://sftp-Azurite:10000/devstoreaccount1;QueueEndpoint=http://sftp-Azurite:10001/devstoreaccount1; # pragma: allowlist secret
ENV: local
# Uncomment the line below to call local report stream. Otherwise, we'll use a mock response
# REPORT_STREAM_URL_PREFIX: http://host.docker.internal:7071
CA_PHL_CLIENT_NAME: flexion.simulated-lab
QUEUE_MAX_DELIVERY_ATTEMPTS: 5
POLLING_TRIGGER_QUEUE_NAME: polling-trigger-queue
volumes:
# map to Azurite data objects to the build directory
- ./localdata/data/reportstream:/home/myLowPrivilegeUser/localdata
- ./mock_credentials:/home/myLowPrivilegeUser/mock_credentials
ports:
- "8081:8080" # default api endpoint port
depends_on:
sftp-Azurite:
condition: service_started
azure-cli:
condition: service_completed_successfully
sftp-server:
condition: service_started
networks:
- sftp
sftp-Azurite:
image: mcr.microsoft.com/azure-storage/azurite
# uncomment the line below to skip x-ms-version checks
# command: azurite --skipApiVersionCheck --blobHost 0.0.0.0 --queueHost 0.0.0.0
volumes:
# map to Azurite data objects to the build directory
- ./localdata/data/azurite:/data
ports:
- "12000:10000"
- "12001:10001"
- "12002:10002"
networks:
- sftp
azure-cli:
image: mcr.microsoft.com/azure-cli
volumes:
- ./mock_data:/mock_data
command:
- /bin/sh
- -c
- |
az storage container create -n config
az storage container create -n sftp
az storage blob upload --overwrite --account-name devstoreaccount1 --container-name sftp --name import/order_message.hl7 --file mock_data/order_message.hl7
az storage blob upload --overwrite --account-name devstoreaccount1 --container-name config --name flexion.json --file config/flexion.json
az storage blob upload --overwrite --account-name devstoreaccount1 --container-name config --name ca-phl.json --file config/ca-phl.json
az storage queue create -n message-import-queue
az storage queue create -n message-import-dead-letter-queue
az storage queue create -n polling-trigger-queue
az storage queue create -n polling-trigger-dead-letter-queue
environment:
AZURE_STORAGE_CONNECTION_STRING: DefaultEndpointsProtocol=http;AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;BlobEndpoint=http://sftp-Azurite:10000/devstoreaccount1;QueueEndpoint=http://sftp-Azurite:10001/devstoreaccount1; # pragma: allowlist secret
networks:
- sftp
depends_on:
- sftp-Azurite
azure-function:
image: mcr.microsoft.com/azure-functions/node:4-node20
volumes:
- ./azure_functions:/home/site/wwwroot
ports:
- "7072:7071"
command:
- /bin/sh
- -c
- |
cd /home/site/wwwroot
npm install -g [email protected]
npm install
npm run start
environment:
AzureWebJobsScriptRoot: /home/site/wwwroot
AzureFunctionsJobHost__Logging__Console__IsEnabled: true
AzureWebJobs.HttpExample.Disabled: "true"
AzureWebJobsStorage: DefaultEndpointsProtocol=http;AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;BlobEndpoint=http://sftp-Azurite:10000/devstoreaccount1;QueueEndpoint=http://sftp-Azurite:10001/devstoreaccount1;TableEndpoint=http://sftp-Azurite:10002/devstoreaccount1; # pragma: allowlist secret
AZURE_STORAGE_CONNECTION_STRING: DefaultEndpointsProtocol=http;AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;BlobEndpoint=http://sftp-Azurite:10000/devstoreaccount1;QueueEndpoint=http://sftp-Azurite:10001/devstoreaccount1; # pragma: allowlist secret
networks:
- sftp
depends_on:
azure-cli:
condition: service_completed_successfully
sftp-server:
condition: service_started
sftp-server:
image: atmoz/sftp
environment:
SFTP_USERS: ti_user:ti_password:::files
volumes:
- ./mock_credentials/ca-phl-sftp-user-credential-public-key-local:/home/ti_user/.ssh/keys/id_rsa.pub:ro
- ./mock_credentials/ca-phl-sftp-host-private-key-local:/etc/ssh/ssh_host_rsa_key
- ./localdata/sftp_server_require_publickey.sh:/etc/sftp.d/sftp_server_require_publickey.sh
- ./localdata/data/sftp:/home/ti_user/files/DPH-Staging/HealthPartner-Staging/UCSD/OUTPUT
ports:
- "2223:22"
networks:
- sftp
networks:
sftp: