forked from sorry-cypress/sorry-cypress
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.azure-blob-storage.yml
79 lines (74 loc) · 3.06 KB
/
docker-compose.azure-blob-storage.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
version: '3.6'
# https://docs.microsoft.com/en-us/azure/storage/common/storage-use-azurite?tabs=visual-studio
services:
mongo:
image: mongo:4.4
volumes:
- ./data/data-mongo-cypress:/data/db
ports:
- 27017:27017
director:
image: agoldis/sorry-cypress-director:latest
hostname: director
environment:
DASHBOARD_URL: http://localhost:8080
EXECUTION_DRIVER: '../execution/mongo/driver'
GITLAB_JOB_RETRIES: 'false'
MONGODB_URI: 'mongodb://mongo:27017'
MONGODB_DATABASE: 'sorry-cypress'
SCREENSHOTS_DRIVER: '../screenshots/azure-blob-storage.driver'
AZURE_CONNEXION_STRING: 'DefaultEndpointsProtocol=http;AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;BlobEndpoint=http://127.0.0.1:10000/devstoreaccount1;QueueEndpoint=http://127.0.0.1:10001/devstoreaccount1;TableEndpoint=http://127.0.0.1:10001/devstoreaccount1;'
AZURE_CONTAINER_NAME: 'sorry-cypress'
AZURE_UPLOAD_URL_EXPIRY_IN_HOURS: 24
PROBE_LOGGER: "false"
ports:
- '10000:10000'
- '10001:10001'
- '1234:1234'
depends_on:
- mongo
api:
image: agoldis/sorry-cypress-api:latest
environment:
MONGODB_URI: 'mongodb://mongo:27017'
MONGODB_DATABASE: 'sorry-cypress'
APOLLO_PLAYGROUND: 'false'
ports:
- 4000:4000
depends_on:
- mongo
dashboard:
image: agoldis/sorry-cypress-dashboard:latest
environment:
GRAPHQL_SCHEMA_URL: http://localhost:4000
GRAPHQL_CLIENT_CREDENTIALS: ''
PORT: 8080
CI_URL: ''
ports:
- 8080:8080
depends_on:
- mongo
- api
storage:
image: mcr.microsoft.com/azure-storage/azurite
# network_mode is needed for signed url to work correctly. It allows the director to call the storage using localhost and to generate signed url with the hostname "localhost"
# If you try with said "hostname: storage" here, the director will sign an url with the hostname "storage" which will be impossible to use for the runner
# Please note that in this case if you try to replace the hostname in the signed url it doesn't work because the hostname is part of the signed content
network_mode: service:director
restart: always
command: 'azurite --blobHost 0.0.0.0 --blobPort 10000 --queueHost 0.0.0.0 --queuePort 10001'
createbuckets:
image: mcr.microsoft.com/azure-cli:latest
network_mode: service:director
depends_on:
- storage
environment:
AZURE_STORAGE_CONNECTION_STRING: 'DefaultEndpointsProtocol=http;AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;BlobEndpoint=http://127.0.0.1:10000/devstoreaccount1;QueueEndpoint=http://127.0.0.1:10001/devstoreaccount1;TableEndpoint=http://127.0.0.1:10001/devstoreaccount1;'
entrypoint: >
/bin/sh -c "
sleep 3;
echo Creating containers;
az storage container create -n sorry-cypress;
az storage container show -n sorry-cypress;
exit 0;
"