-
Notifications
You must be signed in to change notification settings - Fork 5
/
docker-compose.acra-censor-demo.yml
138 lines (125 loc) · 4.9 KB
/
docker-compose.acra-censor-demo.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
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
version: "3"
services:
# Create keys:
# - ./.acrakeys/acra-server/${ACRA_CLIENT_ID}_server
# - ./.acrakeys/acra-connector/${ACRA_CLIENT_ID}_server.pub
acra-keymaker_server:
# You can specify docker image tag in the environment
# variable ACRA_DOCKER_IMAGE_TAG or run by default with 'latest' images
image: "cossacklabs/acra-keymaker:${ACRA_DOCKER_IMAGE_TAG:-latest}"
environment:
# INSECURE!!! You MUST define your own ACRA_MASTER_KEY
# The default is only for testing purposes
ACRA_MASTER_KEY: ${ACRA_MASTER_KEY:-UHZ3VUNNeTJ0SEFhbWVjNkt4eDdVYkc2WnNpUTlYa0E=}
volumes:
# Mount the whole ./.acrakeys directory to be able generate keys and
# place them in services' subdirectories
- ./.acrakeys:/keys
# Please specify ACRA_CLIENT_ID environment variable, otherwise run with
# default 'testclientid' client id
command: >-
--client_id=${ACRA_CLIENT_ID:-testclientid}
--generate_acraserver_keys
--keys_output_dir=/keys/acra-server
--keys_public_output_dir=/keys/acra-connector
# Create keys:
# - ./.acrakeys/acra-connector/${ACRA_CLIENT_ID}
# - ./.acrakeys/acra-server/${ACRA_CLIENT_ID}.pub
acra-keymaker_connector:
image: "cossacklabs/acra-keymaker:${ACRA_DOCKER_IMAGE_TAG:-latest}"
environment:
ACRA_MASTER_KEY: ${ACRA_MASTER_KEY:-UHZ3VUNNeTJ0SEFhbWVjNkt4eDdVYkc2WnNpUTlYa0E=}
volumes:
- ./.acrakeys:/keys
command: >-
--client_id=${ACRA_CLIENT_ID:-testclientid}
--generate_acraconnector_keys
--keys_output_dir=/keys/acra-connector
--keys_public_output_dir=/keys/acra-server
#===== Acra ================================================================
acra-server:
image: "cossacklabs/acra-server:${ACRA_DOCKER_IMAGE_TAG:-latest}"
# Restart server after correct termination, for example after the config
# was changed through the API
restart: always
depends_on:
- acra-keymaker_server
- acra-keymaker_connector
networks:
- acraconnector-acraserver
- acraserver-db
environment:
ACRA_MASTER_KEY: ${ACRA_MASTER_KEY:-UHZ3VUNNeTJ0SEFhbWVjNkt4eDdVYkc2WnNpUTlYa0E=}
volumes:
# Mount the directory with only the keys for this service. Must be
# rewriteable in case of using API, otherwise should be read-only.
- ./.acrakeys/acra-server:/keys
# Directory with configuration, rewriteable
- ./.acraconfigs/acra-server:/config
command: >-
--mysql_enable
--db_host=mutillidae
--db_port=3306
--keys_dir=/keys
--auth_keys=/keys/httpauth.accounts
--http_api_enable
--incoming_connection_api_string=tcp://0.0.0.0:9090
--acracensor_config_file=/config/acra-censor.yaml
-v
acra-connector:
image: "cossacklabs/acra-connector:${ACRA_DOCKER_IMAGE_TAG:-latest}"
restart: always
depends_on:
- acra-keymaker_server
- acra-keymaker_connector
- acra-server
# Open the port outside for client application
ports:
- "3306:3306"
networks:
- acraconnector-acraserver
- mutillidae-acraconnector
environment:
ACRA_MASTER_KEY: ${ACRA_MASTER_KEY:-UHZ3VUNNeTJ0SEFhbWVjNkt4eDdVYkc2WnNpUTlYa0E=}
volumes:
# Mount the directory with only the keys for this service
- ./.acrakeys/acra-connector:/keys:ro
command: >-
--acraserver_connection_host=acra-server
--keys_dir=/keys
--client_id=${ACRA_CLIENT_ID:-testclientid}
--incoming_connection_string=tcp://0.0.0.0:3306
--http_api_enable
--incoming_connection_api_string=tcp://0.0.0.0:9191
-v
#===== OWASP Mutillidae II =================================================
edoz90_mutillidae:
# Build base image
build:
context: https://github.com/storojs72/docker-mutillidae.git
image: storojs72/edoz90_mutillidae:latest
# We don't need to run the container based on the original image
entrypoint: /bin/true
restart: 'no'
mutillidae:
depends_on:
- acra-connector
- edoz90_mutillidae
build:
context: ./mutillidae
image: mutillidae:latest
ports:
- "8080:80"
- "3306:3306"
networks:
- world
- mutillidae-acraconnector
- acraserver-db
networks:
world:
acraserver-db:
internal: true
acraconnector-acraserver:
internal: true
mutillidae-acraconnector:
internal: true