services: boxes: image: fedora:latest container_name: ${EXTERNAL_NAME:-boxes} ports: - "${EXTERNAL_PORT:-8000}:8000" environment: BUILD_BRANCH: master BUILD_REPO: https://github.com/florianfesti/boxes.git volumes: - ./boxes:/boxes command: /boxes/scripts/boxesserver deploy: mode: replicated replicas: 1 update_config: parallelism: 1 delay: 10s restart_policy: condition: always build: context: . dockerfile: Dockerfile args: - BUILD_BRANCH= master - BUILD_REPO= https://github.com/florianfesti/boxes.git # Install requirements init: true entrypoint: - /bin/sh - -c - | dnf install -y git-core python3-markdown python3-setuptools python3-affine python3-shapely python3-pillow python3-qrcode pstoedit && dnf clean all git clone --depth 1 -b master https://github.com/florianfesti/boxes.git /boxes chmod +x /boxes/scripts/boxesserver /boxes/scripts/boxesserver