File: full-example.yml

package info (click to toggle)
golang-github-aanand-compose-file 0.0~git20161122.0.a3e5876-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 604 kB
  • ctags: 567
  • sloc: makefile: 12; sh: 9
file content (287 lines) | stat: -rw-r--r-- 6,527 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
version: "3"

services:
  foo:
    cap_add:
      - ALL

    cap_drop:
      - NET_ADMIN
      - SYS_ADMIN

    cgroup_parent: m-executor-abcd

    # String or list
    command: bundle exec thin -p 3000
    # command: ["bundle", "exec", "thin", "-p", "3000"]

    container_name: my-web-container

    depends_on:
      - db
      - redis

    deploy:
      mode: replicated
      replicas: 6
      labels: [FOO=BAR]
      update_config:
        parallelism: 3
        delay: 10s
        failure_action: continue
        monitor: 60s
        max_failure_ratio: 0.3
      resources:
        limits:
          cpus: '0.001'
          memory: 50M
        reservations:
          cpus: '0.0001'
          memory: 20M
      restart_policy:
        condition: on_failure
        delay: 5s
        max_attempts: 3
        window: 120s
      placement:
        constraints: [node=foo]

    devices:
      - "/dev/ttyUSB0:/dev/ttyUSB0"

    # String or list
    # dns: 8.8.8.8
    dns:
      - 8.8.8.8
      - 9.9.9.9

    # String or list
    # dns_search: example.com
    dns_search:
      - dc1.example.com
      - dc2.example.com

    domainname: foo.com

    # String or list
    # entrypoint: /code/entrypoint.sh -p 3000
    entrypoint: ["/code/entrypoint.sh", "-p", "3000"]

    # String or list
    # env_file: .env
    env_file:
      - ../../../../../../loader/example1.env
      - ../../../../../../loader/example2.env

    # Mapping or list
    # Mapping values can be strings, numbers or null
    # Booleans are not allowed - must be quoted
    environment:
      RACK_ENV: development
      SHOW: 'true'
      SESSION_SECRET:
      BAZ: 3
    # environment:
    #   - RACK_ENV=development
    #   - SHOW=true
    #   - SESSION_SECRET

    # Items can be strings or numbers
    expose:
     - "3000"
     - 8000

    external_links:
      - redis_1
      - project_db_1:mysql
      - project_db_1:postgresql

    # Mapping or list
    # Mapping values must be strings
    # extra_hosts:
    #   somehost: "162.242.195.82"
    #   otherhost: "50.31.209.229"
    extra_hosts:
      - "somehost:162.242.195.82"
      - "otherhost:50.31.209.229"

    hostname: foo

    healthcheck:
      test: echo "hello world"
      interval: 10s
      timeout: 1s
      retries: 5

    # Any valid image reference - repo, tag, id, sha
    image: redis
    # image: ubuntu:14.04
    # image: tutum/influxdb
    # image: example-registry.com:4000/postgresql
    # image: a4bc65fd
    # image: busybox@sha256:38a203e1986cf79639cfb9b2e1d6e773de84002feea2d4eb006b52004ee8502d

    ipc: host

    # Mapping or list
    # Mapping values can be strings, numbers or null
    labels:
      com.example.description: "Accounting webapp"
      com.example.number: 42
      com.example.empty-label:
    # labels:
    #   - "com.example.description=Accounting webapp"
    #   - "com.example.number=42"
    #   - "com.example.empty-label"

    links:
     - db
     - db:database
     - redis

    logging:
      driver: syslog
      options:
        syslog-address: "tcp://192.168.0.42:123"

    mac_address: 02:42:ac:11:65:43

    # network_mode: "bridge"
    # network_mode: "host"
    # network_mode: "none"
    # Use the network mode of an arbitrary container from another service
    # network_mode: "service:db"
    # Use the network mode of another container, specified by name or id
    # network_mode: "container:some-container"
    network_mode: "container:0cfeab0f748b9a743dc3da582046357c6ef497631c1a016d28d2bf9b4f899f7b"

    networks:
      some-network:
        aliases:
         - alias1
         - alias3
      other-network:
        ipv4_address: 172.16.238.10
        ipv6_address: 2001:3984:3989::10
      other-other-network:

    pid: "host"

    ports:
      - 3000
      - "3000-3005"
      - "8000:8000"
      - "9090-9091:8080-8081"
      - "49100:22"
      - "127.0.0.1:8001:8001"
      - "127.0.0.1:5000-5010:5000-5010"

    privileged: true

    read_only: true

    restart: always

    security_opt:
      - label=level:s0:c100,c200
      - label=type:svirt_apache_t

    stdin_open: true

    stop_grace_period: 20s

    stop_signal: SIGUSR1

    # String or list
    # tmpfs: /run
    tmpfs:
      - /run
      - /tmp

    tty: true

    ulimits:
      # Single number or mapping with soft + hard limits
      nproc: 65535
      nofile:
        soft: 20000
        hard: 40000

    user: someone

    volumes:
      # Just specify a path and let the Engine create a volume
      - /var/lib/mysql
      # Specify an absolute path mapping
      - /opt/data:/var/lib/mysql
      # Path on the host, relative to the Compose file
      - .:/code
      - ./static:/var/www/html
      # User-relative path
      - ~/configs:/etc/configs/:ro
      # Named volume
      - datavolume:/var/lib/mysql

    working_dir: /code

networks:
  # Entries can be null, which specifies simply that a network
  # called "{project name}_some-network" should be created and
  # use the default driver
  some-network:

  other-network:
    driver: overlay

    driver_opts:
      # Values can be strings or numbers
      foo: "bar"
      baz: 1

    ipam:
      driver: overlay
      # driver_opts:
      #   # Values can be strings or numbers
      #   com.docker.network.enable_ipv6: "true"
      #   com.docker.network.numeric_value: 1
      config:
      - subnet: 172.16.238.0/24
        # gateway: 172.16.238.1
      - subnet: 2001:3984:3989::/64
        # gateway: 2001:3984:3989::1

  external-network:
    # Specifies that a pre-existing network called "external-network"
    # can be referred to within this file as "external-network"
    external: true

  other-external-network:
    # Specifies that a pre-existing network called "my-cool-network"
    # can be referred to within this file as "other-external-network"
    external:
      name: my-cool-network

volumes:
  # Entries can be null, which specifies simply that a volume
  # called "{project name}_some-volume" should be created and
  # use the default driver
  some-volume:

  other-volume:
    driver: flocker

    driver_opts:
      # Values can be strings or numbers
      foo: "bar"
      baz: 1

  external-volume:
    # Specifies that a pre-existing volume called "external-volume"
    # can be referred to within this file as "external-volume"
    external: true

  other-external-volume:
    # Specifies that a pre-existing volume called "my-cool-volume"
    # can be referred to within this file as "other-external-volume"
    external:
      name: my-cool-volume