name: pretendo-network services: mitmproxy-pretendo: image: ghcr.io/matthewl246/mitmproxy-pretendo:local # build: ./repos/mitmproxy-pretendo restart: unless-stopped ports: # Proxy server - 8080:8080 # Mitmweb interface - 127.0.0.1:8081:8081 volumes: - type: volume source: mitmproxy-pretendo-data target: /home/mitmproxy/.mitmproxy command: mitmweb --web-host 0.0.0.0 tty: true coredns-internal: # This responds to DNS queries from the internal network of containers, # redirecting them to the nginx container image: coredns/coredns:latest restart: unless-stopped volumes: - type: bind source: ./config/internal.Corefile target: /etc/coredns/Corefile read_only: true networks: internal: ipv4_address: 172.20.0.200 command: -conf /etc/coredns/Corefile nginx: image: nginx:mainline-alpine depends_on: - coredns-internal - mitmproxy-pretendo restart: unless-stopped ports: # HTTP - 80:80 volumes: - type: bind source: ./config/nginx.conf target: /etc/nginx/nginx.conf read_only: true - type: bind source: ./config/nginx target: /etc/nginx/conf.d/ read_only: true - type: bind source: ./logs/nginx/ target: /var/log/nginx/ networks: default: internal: dns: 172.20.0.200 mongodb: # TODO: Set up authentication image: mongo:latest depends_on: - coredns-internal restart: unless-stopped 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 read_only: true - type: volume source: mongodb-database target: /data/db networks: internal: dns: 172.20.0.200 command: --config "/etc/mongod.conf" --replSet rs mongo-express: image: mongo-express:latest depends_on: - coredns-internal - mongodb restart: unless-stopped ports: # Web interface - 127.0.0.1:8082:8082 networks: internal: dns: 172.20.0.200 env_file: - ./environment/mongo-express.env minio: image: minio/minio:latest depends_on: - coredns-internal - nginx restart: unless-stopped ports: # Web console - 127.0.0.1:8083:8083 volumes: - type: volume source: minio-s3-data target: /data networks: internal: dns: 172.20.0.200 env_file: - ./environment/minio.env - ./environment/minio.local.env command: server --console-address ":8083" redis: image: redis:alpine depends_on: - coredns-internal restart: unless-stopped volumes: - type: volume source: redis-data target: /data networks: internal: dns: 172.20.0.200 command: redis-server --save 60 1 redis-commander: image: ghcr.io/joeferner/redis-commander:latest depends_on: - coredns-internal - redis restart: unless-stopped ports: # Web interface - 127.0.0.1:8086:8086 networks: internal: dns: 172.20.0.200 env_file: - ./environment/redis-commander.env # TODO: MailDev appears to be unmaintained and has security vulnerabilities. # Find an alternative. MailCatcher doesn't support persistance, and MailHog # also seems unmaintained. maildev: image: maildev/maildev:latest depends_on: - coredns-internal restart: unless-stopped ports: # MailDev web UI - 127.0.0.1:8084:8084 volumes: - type: volume source: maildev-mail target: /data networks: internal: dns: 172.20.0.200 env_file: - ./environment/maildev.env # We need to set the user to root so that MailDev can write to the volume. user: root postgres: image: postgres:alpine depends_on: - coredns-internal restart: unless-stopped ports: # For connecting with pgAdmin - 127.0.0.1:5432:5432 volumes: - type: volume source: postgres-database target: /var/lib/postgresql/data - type: bind source: ./scripts/run-in-container/postgres-init.sh target: /docker-entrypoint-initdb.d/postgres-init.sh read_only: true networks: internal: dns: 172.20.0.200 env_file: - ./environment/postgres.env - ./environment/postgres.local.env adminer: image: adminer:latest depends_on: - coredns-internal - postgres restart: unless-stopped ports: # Adminer web interface - 127.0.0.1:8085:8080 volumes: - type: bind source: ./config/adminer-login-servers.php target: /var/www/html/plugins-enabled/login-servers.php read_only: true networks: internal: dns: 172.20.0.200 env_file: - ./environment/adminer.env account: build: ./repos/account depends_on: - coredns-internal - nginx - mongodb - minio - redis - maildev restart: unless-stopped ports: # Node.js debugger - 127.0.0.1:9229:9229 volumes: - type: bind source: ./logs/account/ target: /app/logs/ networks: internal: dns: 172.20.0.200 env_file: - ./environment/account.env - ./environment/account.local.env website: build: ./repos/website depends_on: - account - mongodb restart: unless-stopped ports: # Node.js debugger - 127.0.0.1:9230:9230 volumes: - type: bind source: ./logs/website/ target: /app/logs/ - type: bind source: ./config/website-config.json target: /app/config.json read_only: true networks: internal: dns: 172.20.0.200 friends: build: ./repos/friends depends_on: - account - postgres restart: unless-stopped ports: # Go delve debugger - 127.0.0.1:2345:2345 # Authentication server - 6000:6000/udp # Secure server - 6001:6001/udp volumes: - type: bind source: ./logs/friends/ target: /build/log/ networks: internal: dns: 172.20.0.200 env_file: - ./environment/friends.env - ./environment/friends.local.env miiverse-api: build: ./repos/miiverse-api depends_on: - account - mongodb - friends restart: unless-stopped ports: # Node.js debugger - 127.0.0.1:9231:9231 volumes: - type: bind source: ./logs/miiverse-api/ target: /app/logs/ networks: internal: dns: 172.20.0.200 env_file: - ./environment/miiverse-api.env - ./environment/miiverse-api.local.env juxtaposition-ui: build: ./repos/juxtaposition-ui depends_on: - account - mongodb - redis - friends restart: unless-stopped ports: # Node.js debugger - 127.0.0.1:9232:9232 volumes: - type: bind source: ./logs/juxtaposition-ui/ target: /app/src/logs/ - type: bind source: ./config/juxtaposition-config.js target: /app/config.js read_only: true networks: internal: dns: 172.20.0.200 env_file: - ./environment/juxtaposition-ui.env - ./environment/juxtaposition-ui.local.env boss: build: ./repos/BOSS depends_on: - account - mongodb restart: unless-stopped ports: # Node.js debugger - 127.0.0.1:9233:9233 volumes: - type: bind source: ./logs/boss/ target: /app/logs/ networks: internal: dns: 172.20.0.200 env_file: - ./environment/boss.env - ./environment/boss.local.env wiiu-chat-authentication: build: ./repos/wiiu-chat-authentication depends_on: - account - mongodb restart: unless-stopped ports: # Go delve debugger - 127.0.0.1:2346:2346 # Authentication server - 6002:6002/udp volumes: - type: bind source: ./logs/wiiu-chat-authentication/ target: /app/log/ networks: internal: dns: 172.20.0.200 env_file: - ./environment/wiiu-chat.env - ./environment/wiiu-chat.local.env wiiu-chat-secure: build: ./repos/wiiu-chat-secure depends_on: - account - mongodb - wiiu-chat-authentication restart: unless-stopped ports: # Go delve debugger - 127.0.0.1:2347:2347 # Secure server - 6003:6003/udp volumes: - type: bind source: ./logs/wiiu-chat-secure/ target: /app/log/ networks: internal: dns: 172.20.0.200 env_file: - ./environment/wiiu-chat.env - ./environment/wiiu-chat.local.env super-mario-maker: build: ./repos/super-mario-maker depends_on: - account - minio - postgres restart: unless-stopped ports: # Go delve debugger - 127.0.0.1:2348:2348 # Authentication server - 6004:6004/udp # Secure server - 6005:6005/udp volumes: - type: bind source: ./logs/super-mario-maker/ target: /app/log/ networks: internal: dns: 172.20.0.200 env_file: - ./environment/super-mario-maker.env - ./environment/super-mario-maker.local.env volumes: mitmproxy-pretendo-data: mongodb-database: minio-s3-data: redis-data: maildev-mail: postgres-database: networks: default: # 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: driver: default config: - subnet: 172.20.0.0/24