pretendo-docker/compose.yml
2023-12-19 13:33:38 -05:00

138 lines
3.7 KiB
YAML

name: pretendo-network
version: "3.8"
services:
mitmproxy-pretendo:
image: ghcr.io/matthewl246/mitmproxy-pretendo:main
build: ./repos/mitmproxy-pretendo
ports:
# Proxy server
- 8080:8080
# Mitmweb interface
- 127.0.0.1:8081:8081
volumes:
- type: bind
source: ./config/mitmproxy.yaml
target: /home/mitmproxy/mitmproxy-config.yaml
- type: volume
source: mitmproxy-pretendo-data
target: /home/mitmproxy/.mitmproxy
command: mitmweb --web-host 0.0.0.0
tty: true
coredns:
image: coredns/coredns:latest
volumes:
- type: bind
source: ./config/Corefile
target: /etc/coredns/Corefile
networks:
internal:
ipv4_address: 172.20.0.2
command: -conf /etc/coredns/Corefile
nginx:
image: nginx:mainline-alpine
ports:
- 80:80
- 443:443
volumes:
- type: bind
source: ./config/nginx.conf
target: /etc/nginx/nginx.conf
- type: bind
source: ./config/nginx
target: /etc/nginx/conf.d/
dns: 172.20.0.2
networks:
default:
internal:
mongodb:
image: mongo:latest
ports:
# For connecting with mongosh or MongoDB Compass
- 127.0.0.1:27017:27017
volumes:
- type: bind
source: ./config/mongod.conf
target: /etc/mongod.conf
- type: volume
source: mongodb-database
target: /data/db
dns: 172.20.0.2
networks:
internal:
command: --config "/etc/mongod.conf" --replSet rs
# TODO: S3 uploads from the servers use the first part of the path (like
# "mii") as the bucket name instead of "pn-cdn". Why?
minio:
image: minio/minio:latest
ports:
# Web console
- 127.0.0.1:9090:9090
env_file:
- ./environment/minio.env
- ./environment/minio.local.env
volumes:
- type: volume
source: minio-s3-data
target: /data
command: server /data --console-address ":9090"
dns: 172.20.0.2
networks:
internal:
# TODO: Set up Redis
# TODO: Set up a SMTP server to log emails
account:
build: ./repos/account
depends_on:
- mongodb
- minio
ports:
# For the Node.js debugger
- 127.0.0.1:9229:9229
env_file:
- ./environment/account.env
- ./environment/account.local.env
volumes:
- type: volume
source: account-certificates
target: /app/certs
dns: 172.20.0.2
networks:
internal:
website:
build: ./repos/website
depends_on:
- mongodb
- account
ports:
# For the Node.js debugger
- 127.0.0.1:9230:9230
volumes:
- type: bind
source: ./config/website-config.json
target: /app/config.json
dns: 172.20.0.2
networks:
internal:
volumes:
mitmproxy-pretendo-data:
mongodb-database:
minio-s3-data:
account-certificates:
networks:
# We need to use a custom network so that we can set a static IP address for
# CoreDNS and use it as a DNS server for the other containers.
internal:
driver: bridge
ipam:
config:
- subnet: 172.20.0.0/16