A Simple Example
version: "3" services: nginx: image: nginx:latest environment: - FLAG=<FLAG> ports: - 80 deploy: placement: constraints: - node.role != manager resources: limits: cpus: '0.05' memory: 50M reservations: cpus: '0.001' memory: 10M
alpineas the base image as can as possible.
Tips: You can use
wrfly/alpine-cn:latest to get a better download/install speed in the container.
Each service has one public port at most.(I'm tring to make it more.)
The service use
FLAGenvironment as the input flag.
How to Name the Templates
The tag is reserved for other usage such as different version of the service.