Skip to content

Instantly share code, notes, and snippets.

@thanch2n
Last active June 1, 2019 12:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save thanch2n/901ce9937f660624eed6209b7e5f591e to your computer and use it in GitHub Desktop.
Save thanch2n/901ce9937f660624eed6209b7e5f591e to your computer and use it in GitHub Desktop.
version: '3.7'
# docker config create v2_conf config_v2.json
services:
v2:
image: v2ray/official:latest
ports:
- "53428:53428/tcp"
- "53428:53428/udp"
- "53429:53429/tcp"
- "53429:53429/udp"
# volumes:
# - "./config_v2.json:/etc/v2ray/config.json"
configs:
- source: v2_conf
target: /etc/v2ray/config.json
deploy:
labels:
com.description: "v2ray"
mode: replicated
replicas: 1
update_config:
parallelism: 2
delay: 2s
monitor: 0s
failure_action: rollback
max_failure_ratio: 0.3
order: stop-first
restart_policy:
condition: on-failure
delay: 2s
max_attempts: 3
window: 10s
resources:
limits:
cpus: "0.8"
memory: 500M
configs:
v2_conf:
external: true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment