mirror of
https://github.com/psviderski/uncloud.git
synced 2026-08-26 19:13:34 +00:00
feat: add support for entrypoint, cpus, mem_limit, mem_reservation, priviliged, user to Compose deployment
This commit is contained in:
+33
@@ -0,0 +1,33 @@
|
||||
services:
|
||||
no-deploy:
|
||||
image: nginx:latest
|
||||
cpus: 1.5
|
||||
mem_limit: 100M
|
||||
mem_reservation: 50M
|
||||
scale: 3
|
||||
|
||||
deploy:
|
||||
image: nginx:latest
|
||||
deploy:
|
||||
replicas: 3
|
||||
resources:
|
||||
limits:
|
||||
cpus: 1.5
|
||||
memory: 100M
|
||||
reservations:
|
||||
memory: 50M
|
||||
|
||||
both:
|
||||
image: nginx:latest
|
||||
cpus: 2
|
||||
mem_limit: 102400K
|
||||
mem_reservation: 52428800
|
||||
scale: 3
|
||||
deploy:
|
||||
replicas: 3
|
||||
resources:
|
||||
limits:
|
||||
cpus: 2.0
|
||||
memory: 100M
|
||||
reservations:
|
||||
memory: 50M
|
||||
@@ -0,0 +1,41 @@
|
||||
services:
|
||||
test:
|
||||
command: ["nginx", "updated", "command"]
|
||||
cpus: 0.5
|
||||
entrypoint: ["/updated-docker-entrypoint.sh"]
|
||||
environment:
|
||||
BOOL: "true"
|
||||
EMPTY: ""
|
||||
VAR: value
|
||||
image: nginx:latest
|
||||
init: true
|
||||
logging:
|
||||
driver: json-file
|
||||
options:
|
||||
max-size: 10m
|
||||
max-file: 3
|
||||
mem_limit: 100M
|
||||
mem_reservation: 50M
|
||||
privileged: true
|
||||
pull_policy: always
|
||||
scale: 3
|
||||
user: nginx:nginx
|
||||
volumes:
|
||||
- /etc/passwd:/host/etc/passwd:ro
|
||||
- data1:/data1
|
||||
- type: volume
|
||||
source: data2-alias
|
||||
target: /data2/long/syntax
|
||||
- data-external:/external:ro
|
||||
- type: tmpfs
|
||||
target: /tmpfs
|
||||
tmpfs:
|
||||
size: 10485760
|
||||
|
||||
volumes:
|
||||
data1:
|
||||
data2-alias:
|
||||
name: data2
|
||||
driver: local
|
||||
data-external:
|
||||
external: true
|
||||
@@ -0,0 +1,3 @@
|
||||
services:
|
||||
test:
|
||||
image: nginx:latest
|
||||
Reference in New Issue
Block a user