-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
executable file
·69 lines (67 loc) · 1.91 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
services:
alice:
hostname: alice
build:
dockerfile: Dockerfile-alice
restart: always
networks:
- a_mitm # this ensures that this network is first alphabetically and is assigned eth0
command: '/bin/bash -c "printf \"`dig +short github.com`\\twww.github.com\\n`dig +short github.com`\\tgithub.com\\n\" >> /etc/hosts && trap : TERM INT; sleep infinity & wait"'
# To use bob, update BACKEND_URL in git-proxy/app.py to http://bob
bob:
hostname: bob
image: nginx
volumes:
- ./git-server/files:/usr/share/nginx/html
ports:
- "1000:80"
environment:
- NGINX_PORT=80
networks:
- a_mitm
# Uncomment to replace with a smart git server
# bob:
# hostname: bob
# image: cirocosta/gitserver-http
# ports:
# - 1000:80
# volumes:
# - ./git-server/files:/var/lib/git
# networks:
# - a_mitm
eve:
hostname: eve
privileged: true
build: git-proxy/
sysctls:
- net.ipv4.ip_forward=1
- net.ipv6.conf.all.forwarding=1
- net.ipv4.conf.all.send_redirects=0
networks:
- a_mitm
- db
volumes:
- "./git-proxy:/app"
ports:
- "8000:8080"
depends_on:
eve-db:
condition: service_healthy
eve-db:
image: postgres
environment:
- POSTGRES_PASSWORD=postgres
- POSTGRES_DB=db
networks:
- db
shm_size: 128mb
volumes:
- ./db-data:/var/lib/postgresql/data
healthcheck: # Ensure database is ready before starting MITM proxy
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 5s
timeout: 5s
retries: 50
networks:
a_mitm:
db: