37 lines
1012 B
YAML
37 lines
1012 B
YAML
services:
|
|
boxes:
|
|
image: fedora:latest
|
|
container_name: ${EXTERNAL_NAME}
|
|
ports:
|
|
- "${EXTERNAL_PORT}: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: on-failure
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile
|
|
args:
|
|
- BUILD_BRANCH=${BUILD_BRANCH}
|
|
- BUILD_REPO=${BUILD_REPO}
|
|
# 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 ${BUILD_BRANCH} ${BUILD_REPO} /boxes
|
|
chmod +x /boxes/scripts/boxesserver
|
|
/boxes/scripts/boxesserver
|