name: "shadowsocks-proxies"
services:
{% for proxy_name, proxy_config in shadowsocks_proxies.items() %}
  {{ proxy_name }}:
    image: {{ shadowsocks_image }}
    container_name: {{ proxy_name }}
    restart: always
    ports:
      - "127.0.0.1:{{ proxy_config.local_port }}:{{ proxy_config.local_port }}/tcp"
      - "127.0.0.1:{{ proxy_config.local_port }}:{{ proxy_config.local_port }}/udp"
    volumes:
      - ./config_ssp_{{ proxy_config.local_port }}/:/etc/shadowsocks-rust/:ro
    networks:
      - default
      - {{ docker_network_name }}
{% endfor %}

networks:
  {{ docker_network_name }}:
    name: {{ docker_network_name }}
    external: true
