add memmory options

This commit is contained in:
Robert Kaussow 2018-12-16 17:22:49 +01:00
parent 441336ff0a
commit bd78eb9560
2 changed files with 17 additions and 0 deletions

View File

@ -9,9 +9,14 @@ droneci_server_image: "drone/drone:{{ droneci_version }}"
droneci_server_restart_policy: always droneci_server_restart_policy: always
droneci_server_exposed_port: 8080 droneci_server_exposed_port: 8080
droneci_server_exposed_ip: 127.0.0.1 droneci_server_exposed_ip: 127.0.0.1
# droneci_server_memory_limit: 512m # defaults to not set
# droneci_server_memory_reservation: 256m # defaults to not set
# droneci_server_extra_hosts: []
droneci_agent_image: "drone/agent:{{ droneci_version }}" droneci_agent_image: "drone/agent:{{ droneci_version }}"
droneci_agent_restart_policy: always droneci_agent_restart_policy: always
# droneci_agent_memory_limit: 512m # defaults to not set
# droneci_agent_memory_reservation: 256m # defaults to not set
droneci_postgres_enabled: False droneci_postgres_enabled: False
droneci_postgres_ssl_mode: disable droneci_postgres_ssl_mode: disable

View File

@ -54,6 +54,12 @@ services:
{% endif %} {% endif %}
- NO_PROXY={{ droneci_no_proxy | join(',') }} - NO_PROXY={{ droneci_no_proxy | join(',') }}
- no_proxy={{ droneci_no_proxy | join(',') }} - no_proxy={{ droneci_no_proxy | join(',') }}
{% if droneci_server_memory_limitis defined %}
mem_limit: {{ droneci_server_memory_limitis }}
{% endif %}
{% if droneci_server_memory_reservation is defined %}
mem_reservation: {{ droneci_server_memory_reservation }}
{% endif %}
droneagent: droneagent:
image: {{ droneci_agent_image }} image: {{ droneci_agent_image }}
@ -69,6 +75,12 @@ services:
- DRONE_SECRET={{ droneci_secret }} - DRONE_SECRET={{ droneci_secret }}
# TODO: temp static value, needs to be replaced by a custom fact # TODO: temp static value, needs to be replaced by a custom fact
- DOCKER_API_VERSION=1.26 - DOCKER_API_VERSION=1.26
{% if droneci_agent_memory_limitis defined %}
mem_limit: {{ droneci_agent_memory_limit }}
{% endif %}
{% if droneci_agent_memory_reservation is defined %}
mem_reservation: {{ droneci_agent_memory_reservation }}
{% endif %}
{% if not droneci_postgres_enabled %} {% if not droneci_postgres_enabled %}
volumes: volumes: