# Environment variables: # # - OUINET_VERSION: Optional version tag (default 'latest'). # - OUINET_ROLE: Optional node role: 'injector' or 'client' (default). # - OUINET_MEM_LIMIT: Optional memory limit (default '8g'), # may require the ``--compatibility`` option (see below). # # Usage example for client (with default environment file): # # $ echo COMPOSE_PROJECT_NAME=ouinet-client >> .env # optional # $ echo OUINET_ROLE=client >> .env # optional # $ docker-compose up # # To run a shell on its data volume: # # $ docker-compose run --rm shell # version: '3' services: shell: image: busybox volumes: - data:/var/opt/ouinet network_mode: none # This leaves the user at the right place when running a shell. working_dir: /var/opt/ouinet # The shell just exits successfully on up or start. node: image: "equalitie/ouinet:${OUINET_VERSION:-latest}" volumes: - data:/var/opt/ouinet # Uncomment the following lines to # mount a static cache root from the host. # # - type: bind # source: /host/path/to/static-cache # target: /var/opt/ouinet/static-cache # read_only: true # # Host networking is preferred over port forwarding # if running on a Linux host (especially for injectors). # Otherwise see below. network_mode: host # If you get "connection refused" errors when # accessing the client's HTTP proxy at ``127.0.0.1:8077``, # your computer may not support Docker host networking. # Comment the line above and uncomment the ones below # to enable port forwarding. # #network_mode: bridge #ports: # - "127.0.0.1:8077:8077" # client HTTP proxy # - "127.0.0.1:8078:8078" # client front-end # # Then edit `client/ouinet-client.conf` in the shell container # so that the following options appear: # # listen-on-tcp = 0.0.0.0:8077 # front-end-ep = 0.0.0.0:8078 # command: ["${OUINET_ROLE:-client}"] # The service will be restarted (also on reboot) # until it is manually stopped. restart: unless-stopped # These do not work for non-swarm deployments # unless you use the ``--compatibility`` option, # see # and . deploy: restart_policy: condition: on-failure max_attempts: 3 window: 30s resources: limits: memory: "${OUINET_MEM_LIMIT:-8g}" # Uncomment the following if you run a debug image # and the program fails to start because of # GDB being unable to trace the inferior process # (with "ptrace: Operation not permitted"). # #cap_add: # - SYS_PTRACE volumes: data: