-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
224 lines (218 loc) · 7.71 KB
/
Copy pathdocker-compose.yml
File metadata and controls
224 lines (218 loc) · 7.71 KB
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
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
services:
web:
build:
context: .
dockerfile: docker/web/Dockerfile
args:
SMTP_HOST: ${SMTP_HOST}
image: ${CI_REGISTRY_IMAGE}/phishingator_web:${CI_COMMIT_REF_SLUG}
container_name: phishingator-${ORG}-web
restart: always
depends_on:
database:
condition: service_started
ldap-migrator:
condition: service_completed_successfully
volumes:
- /phishingator-data/${ORG}/logs:/var/www/phishingator/logs
- /phishingator-data/${ORG}/websites-templates/sites-config:/var/www/phishingator/templates/sites-config
- /phishingator-data/${ORG}/websites-templates/websites:/var/www/phishingator/templates/websites:ro
- /phishingator-data/${ORG}/certs/ldap.crt:/etc/ssl/certs/ldap.crt:ro
environment:
- ORG
- ORG_DOMAIN
- WEB_HOST
- WEB_URL
- EMAILS_ALLOWED_DOMAINS
- CSRF_KEY
- PHISHINGATOR_TOKEN
- DOMAINER_ALLOWED_IP
- MONITORING_ALLOWED_IP
- MONITORING_SKIP_TEST_CREDS_INVALID
- FRAUDULENT_HOSTS
- DB_HOST
- DB_USERNAME
- DB_PASSWORD
- DB_DATABASE
- LDAP_HOSTNAME
- LDAP_PORT
- LDAP_USERNAME
- LDAP_PASSWORD
- LDAP_BASE_DN
- LDAP_USERS_DN
- LDAP_USER_ATTR_ID
- LDAP_USER_ATTR_FULLNAME
- LDAP_USER_ATTR_FIRSTNAME
- LDAP_USER_ATTR_SURNAME
- LDAP_USER_ATTR_EMAIL
- LDAP_USER_ATTR_GROUPS
- LDAP_GROUPS_DN
- LDAP_GROUPS_ATTR_MEMBER
- LDAP_DEPARTMENTS_DN
- LDAP_ROOT_DEPARTMENTS_FILTER_DN
- INDEPENDENT_DEPARTMENTS
- LDAP_MIGRATOR_HOST
- OIDC_METADATA_URL
- OIDC_CLIENT_ID
- OIDC_CLIENT_SECRET
- OIDC_IDP_FILTER
- OIDC_CRYPTO_PASSPHRASE
- SMTP_HOST
- SMTP_PORT
- SMTP_TLS
- SMTP_USERNAME
- SMTP_PASSWORD
- TEST_USERNAME
- TEST_USERNAME_LDAP_SUFFIX
- TEST_PASSWORD
- ITS_URL
- NOTIFICATION_SENDER
- AUTHENTICATION_TYPE
- AUTHENTICATION_USERNAME_TO_LOWERCASE
- AUTHENTICATION_LDAP_HOST
- AUTHENTICATION_LDAP_PORT
- AUTHENTICATION_LDAP_USER_PREFIX
- AUTHENTICATION_LDAP_USER_SUFFIX
- AUTHENTICATION_WEB_URL
- AUTHENTICATION_WEB_INPUT_USERNAME
- AUTHENTICATION_WEB_INPUT_PASSWORD
- AUTHENTICATION_WEB_RESPONSE_CODE
- AUTHENTICATION_WEB_RESPONSE_OUTPUT
- AUTHENTICATION_M365_URL
- AUTHENTICATION_M365_CLIENT_ID
- AUTHENTICATION_M365_CLIENT_SECRET
- AUTHENTICATION_M365_USER_SUFFIX
- AUTHENTICATION_IMAP_ARGS
- AUTHENTICATION_POLICY_MIN_LENGTH
- AUTHENTICATION_POLICY_MIN_CHARS_GROUPS
- AUTHENTICATION_POLICY_ALLOW_CONTAIN_USERNAME
- PASSWORD_LEVEL_ANONYMIZATION
- PHISHING_WEBSITE_IGNORED_USER_AGENTS
- PHISHING_WEBSITE_IGNORED_IP
- CAMPAIGN_STATS_AGGREGATION
- CAMPAIGN_STATS_BLUR_IDENTITIES
- CAMPAIGN_DEFAULT_ONSUBMIT_ACTION
- CAMPAIGN_ACTIVE_HIDE_EMAILS
- USER_PREFER_EMAIL
networks:
- web-net
- database-net
- scheduler-net
- ldap-net
database:
build:
context: .
dockerfile: docker/database/Dockerfile
image: ${CI_REGISTRY_IMAGE}/phishingator_database:${CI_COMMIT_REF_SLUG}
container_name: phishingator-${ORG}-database
restart: always
depends_on:
ldap-migrator:
condition: service_completed_successfully
environment:
- MYSQL_USER=${DB_USERNAME}
- MYSQL_ROOT_PASSWORD=${DB_PASSWORD}
- MYSQL_DATABASE=${DB_DATABASE}
volumes:
- /phishingator-data/${ORG}/database:/var/lib/mysql/
- /phishingator-data/${ORG}/database-dumps:/phishingator-dumps
networks:
- database-net
scheduler:
build:
context: .
dockerfile: docker/scheduler/Dockerfile
image: ${CI_REGISTRY_IMAGE}/phishingator_scheduler:${CI_COMMIT_REF_SLUG}
container_name: phishingator-${ORG}-scheduler
restart: always
depends_on:
- web
environment:
- PHISHINGATOR_TOKEN
networks:
- scheduler-net
ldap-migrator:
build:
context: .
dockerfile: docker/ldap-migrator/Dockerfile
image: ${CI_REGISTRY_IMAGE}/phishingator_ldap_migrator:${CI_COMMIT_REF_SLUG}
container_name: phishingator-${ORG}-ldap-migrator
restart: no
environment:
- LDAP_MIGRATOR_HOST
- LDAP_MIGRATOR_USER
- LDAP_MIGRATOR_PASS
- LDAP_MIGRATOR_BASE_DN
volumes:
- /phishingator-data/${ORG}/certs/ldap.crt:/etc/ssl/certs/ldap.crt:ro
- /phishingator-data/${ORG}/ldap:/phishingator/ldap
networks:
- ldap-migrator-net
ldap:
image: osixia/openldap:1.5.0
container_name: phishingator-${ORG}-ldap
restart: always
environment:
- LDAP_DOMAIN=${LDAP_LOCAL_DOMAIN}
- LDAP_ORGANISATION=${LDAP_LOCAL_ORGANISATION}
- LDAP_BASE_DN=${LDAP_LOCAL_BASE_DN}
- LDAP_ADMIN_PASSWORD=${LDAP_LOCAL_ADMIN_PASSWORD}
- LDAP_CONFIG_PASSWORD=${LDAP_LOCAL_CONFIG_PASSWORD}
- LDAP_READONLY_USER=true
- LDAP_READONLY_USER_USERNAME=${LDAP_LOCAL_READONLY_USER_USERNAME}
- LDAP_READONLY_USER_PASSWORD=${LDAP_LOCAL_READONLY_USER_PASSWORD}
depends_on:
ldap-migrator:
condition: service_completed_successfully
volumes:
- /phishingator-data/${ORG}/ldap/users.ldif:/container/service/slapd/assets/config/bootstrap/ldif/custom/bootstrap.ldif:ro
command: --copy-service
networks:
- ldap-net
waf:
build:
context: .
dockerfile: docker/waf/Dockerfile
image: ${CI_REGISTRY_IMAGE}/phishingator_waf:${CI_COMMIT_REF_SLUG}
container_name: phishingator-${ORG}-waf
restart: always
depends_on:
- web
environment:
- PARANOIA=1
- ANOMALY_INBOUND=10
- ANOMALY_OUTBOUND=5
- BACKEND=http://phishingator-${ORG}-web
- REMOTEIP_INT_PROXY=172.18.0.0/16
- MODSEC_REQ_BODY_NOFILES_LIMIT=524288
labels:
- traefik.enable=true
- traefik.docker.network=traefik
- traefik.http.routers.${CI_COMMIT_REF_SLUG}-phishingator-https.rule=Host(`$WEB_HOST`)
- traefik.http.routers.${CI_COMMIT_REF_SLUG}-phishingator-https.entrypoints=websecure
- traefik.http.routers.${CI_COMMIT_REF_SLUG}-phishingator-https.tls.certresolver=leresolver
- traefik.http.routers.${CI_COMMIT_REF_SLUG}-phishingator-https.service=${CI_COMMIT_REF_SLUG}-phishingator-waf
- traefik.http.routers.${CI_COMMIT_REF_SLUG}-phishingator-http.rule=Host(`$WEB_HOST`)
- traefik.http.routers.${CI_COMMIT_REF_SLUG}-phishingator-http.entrypoints=web
- traefik.http.routers.${CI_COMMIT_REF_SLUG}-phishingator-http.middlewares=redirect-to-https
- traefik.http.routers.${CI_COMMIT_REF_SLUG}-phishingator-fraudulent-https.rule=$FRAUDULENT_HOSTS_TRAEFIK
- traefik.http.routers.${CI_COMMIT_REF_SLUG}-phishingator-fraudulent-https.entrypoints=websecure
- traefik.http.routers.${CI_COMMIT_REF_SLUG}-phishingator-fraudulent-https.tls.certresolver=leresolver
- traefik.http.routers.${CI_COMMIT_REF_SLUG}-phishingator-fraudulent-https.service=${CI_COMMIT_REF_SLUG}-phishingator-waf
- traefik.http.routers.${CI_COMMIT_REF_SLUG}-phishingator-fraudulent-http.rule=$FRAUDULENT_HOSTS_TRAEFIK
- traefik.http.routers.${CI_COMMIT_REF_SLUG}-phishingator-fraudulent-http.entrypoints=web
- traefik.http.routers.${CI_COMMIT_REF_SLUG}-phishingator-fraudulent-http.service=${CI_COMMIT_REF_SLUG}-phishingator-waf
- traefik.http.middlewares.redirect-to-https.redirectscheme.scheme=https
- traefik.http.middlewares.redirect-to-https.redirectscheme.permanent=true
- traefik.http.services.${CI_COMMIT_REF_SLUG}-phishingator-waf.loadbalancer.server.port=8080
networks:
- web-net
- traefik
networks:
web-net:
database-net:
scheduler-net:
ldap-migrator-net:
ldap-net:
traefik:
external: true