version: "3.8" services: semaphore: image: semaphoreui/semaphore:latest restart: unless-stopped ports: - "3004:3000" environment: - SEMAPHORE_DB_DIALECT=mysql - SEMAPHORE_DB_HOST=semaphore-db - SEMAPHORE_DB_PORT=3306 - SEMAPHORE_DB_USER=semaphore - SEMAPHORE_DB_PASS=${SEMAPHORE_DB_PASSWORD} - SEMAPHORE_DB_NAME=semaphore - SEMAPHORE_DB=semaphore - SEMAPHORE_PLAYBOOK_PATH=/tmp/semaphore - SEMAPHORE_ADMIN_PASSWORD=${SEMAPHORE_ADMIN_PASSWORD} - SEMAPHORE_ADMIN_NAME=admin - SEMAPHORE_ADMIN_EMAIL=admin@hobbs.farm - SEMAPHORE_ADMIN=admin - SEMAPHORE_ACCESS_KEY_ENCRYPTION=${SEMAPHORE_ENCRYPTION_KEY} - SEMAPHORE_LDAP_ACTIVATED=no volumes: - /data/configs/semaphore:/etc/semaphore - /data/configs/semaphore/playbooks:/tmp/semaphore depends_on: - semaphore-db networks: - semaphore-internal healthcheck: test: ["CMD-SHELL", "wget -q --spider http://localhost:3000/api/ping || exit 1"] interval: 30s timeout: 10s retries: 3 start_period: 60s logging: driver: "json-file" options: max-size: "50m" max-file: "3" deploy: mode: replicated replicas: 1 placement: constraints: - node.hostname == hf-pdocker-01 resources: limits: memory: 512M semaphore-db: image: mysql:8.0 restart: unless-stopped environment: - MYSQL_ROOT_PASSWORD=${SEMAPHORE_MYSQL_ROOT_PASSWORD} - MYSQL_DATABASE=semaphore - MYSQL_USER=semaphore - MYSQL_PASSWORD=${SEMAPHORE_DB_PASSWORD} volumes: - /data/configs/semaphore-db:/var/lib/mysql networks: - semaphore-internal healthcheck: test: ["CMD-SHELL", "mysqladmin ping -h 127.0.0.1 --silent"] interval: 30s timeout: 10s retries: 3 start_period: 30s logging: driver: "json-file" options: max-size: "50m" max-file: "3" deploy: mode: replicated replicas: 1 placement: constraints: - node.hostname == hf-pdocker-01 labels: - "com.centurylinklabs.watchtower.enable=false" resources: limits: memory: 512M networks: semaphore-internal: driver: overlay