-
Notifications
You must be signed in to change notification settings - Fork 49
/
docker-compose.yml
121 lines (116 loc) · 3.3 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
111
112
113
114
115
116
117
118
119
120
121
version: '3.1'
services:
# Dependencies for running unit tests and for running the 'irma' command line tool using one of the test configurations.
postgres:
image: postgres:15
environment:
POSTGRES_USER: testuser
POSTGRES_PASSWORD: testpassword
POSTGRES_DB: test
networks:
# We use a localhost alias such that the test configuration also works for users who run it without Docker.
irma-net:
aliases:
- postgres.localhost
ports:
- 5432:5432
postgres-init:
image: postgres:15
environment:
PGHOST: postgres
PGUSER: testuser
PGPASSWORD: testpassword
PGDATABASE: test
networks:
- irma-net
depends_on:
- postgres
volumes:
- ./server/keyshare/schema.sql:/schema.sql
- ./server/keyshare/cleanup.sql:/cleanup.sql
# We have to wait until the database is up and running.
# Database might already be running, so we need to do a cleanup first.
command: /bin/sh -c "sleep 5 && psql -f cleanup.sql && psql -f schema.sql"
mysql:
image: mysql:8
environment:
MYSQL_ROOT_PASSWORD: testpassword
MYSQL_DATABASE: test
MYSQL_USER: testuser
MYSQL_PASSWORD: testpassword
ports:
- 3306:3306
sqlserver:
image: kcollins/mssql:2019-latest
environment:
ACCEPT_EULA: Y # Confirms your acceptance of the End-User Licensing Agreement.
MSSQL_RANDOM_SA_PASSWORD: Y
MSSQL_DATABASE: test
MSSQL_USER: testuser
MSSQL_PASSWORD: testpassword
MSSQL_PID: Developer
ports:
- 1433:1433
mailhog:
image: mailhog/mailhog
networks:
# We use a localhost alias such that the test configuration also works for users who run it without Docker.
irma-net:
aliases:
- mailhog.localhost
ports:
- 1025:1025
- 8025:8025 # Port of the web interface
# Frontend of 'irma keyshare myirmaserver'
webclient:
image: privacybydesign/irma_keyshare_webclient
build:
context: https://github.com/privacybydesign/irma_keyshare_webclient.git
profiles:
- webclient
networks:
irma-net:
aliases:
- webclient.localhost
ports:
- 3000:3000
# Service to run unit tests
test:
image: golang:1
# Add a test profile to prevent this service to be included when running docker-compose up.
profiles:
- test
volumes:
- .:/irmago
depends_on:
- postgres
- mysql
- sqlserver
- mailhog
# The tests assume postgres and mailhog can be accessed on localhost. Therefore, we use host networking.
network_mode: host
working_dir: /irmago
entrypoint: go test -p 1
command: ./...
# Service to run the 'irma' command line tool
irma:
build: .
image: privacybydesign/irma:edge
# Add a run profile to prevent this service to be included when running docker-compose up.
profiles:
- run
volumes:
- .:/irmago
working_dir: /irmago
depends_on:
- postgres
- postgres-init
- mailhog
networks:
- irma-net
# Docker Desktop for MacOS does not support exposing ports when using host networking. Therefore,
# we have to use bridge networking and expose the ports manually.
# https://github.com/docker/for-mac/issues/1031
networks:
irma-net:
driver: bridge