## 安装Docker Compose # curl -L https://github.com/docker/compose/releases/download/1.24.1/docker-compose-`uname -s`-`uname -m` > /usr/local/bin/docker-compose # chmod +x /usr/local/bin/docker-compose # docker-compose --version # docker-compose up -d version: '2.4' networks: br0: external: true services: serv4rs: container_name: serv4rs image: chunhui2001/debian11:rust-1.66.0.slim hostname: serv4rs #mem_limit: 2048m ports: - 9113:9103 extra_hosts: - "host.docker.internal:host-gateway" environment: #- TZ=Asia/Shanghai - TZ=US - P=serv4rs - APP_PROFILE=staging #entrypoint: ["/bin/sh", "-c", "while true; do echo 1 >/dev/null 2>/dev/null; sleep 1; done"] entrypoint: ["make", "-f", "/root/Makefile", "startup"] volumes: - ../key.pem:/root/serv4rs/key.pem:ro - ../cert.pem:/root/serv4rs/cert.pem:ro - ../Makefile:/root/Makefile:ro - ./.env:/root/serv4rs/.env:ro - ./target:/root/serv4rs/target:ro - ./static:/root/serv4rs/static:ro - ./resources:/root/serv4rs/resources:ro - ./templates:/root/serv4rs/templates:ro restart: always networks: br0: ipv4_address: 172.16.197.222