compose.yaml 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. ---
  2. name: "Ansible Semaphore"
  3. description: "A powerful and flexible automation tool"
  4. version: "0.0.1"
  5. date: "2023-10-01"
  6. author: "Christian Lempa"
  7. tags:
  8. - "ansible"
  9. - "automation"
  10. - "semaphore"
  11. ---
  12. volumes:
  13. semaphore-mysql:
  14. driver: local
  15. services:
  16. mysql:
  17. image: docker.io/library/mysql:8.4
  18. hostname: mysql
  19. volumes:
  20. - semaphore-mysql:/var/lib/mysql
  21. environment:
  22. - MYSQL_RANDOM_ROOT_PASSWORD=yes
  23. - MYSQL_DATABASE=semaphore
  24. - MYSQL_USER=semaphore
  25. - MYSQL_PASSWORD=secret-password # change!
  26. restart: unless-stopped
  27. semaphore:
  28. container_name: ansiblesemaphore
  29. image: docker.io/semaphoreui/semaphore:v2.16.18
  30. user: "${UID}:${GID}"
  31. ports:
  32. - 3000:3000
  33. environment:
  34. - SEMAPHORE_DB_USER=semaphore
  35. - SEMAPHORE_DB_PASS=secret-password # change!
  36. - SEMAPHORE_DB_HOST=mysql
  37. - SEMAPHORE_DB_PORT=3306
  38. - SEMAPHORE_DB_DIALECT=mysql
  39. - SEMAPHORE_DB=semaphore
  40. - SEMAPHORE_PLAYBOOK_PATH=/tmp/semaphore/
  41. - SEMAPHORE_ADMIN_PASSWORD=secret-admin-password # change!
  42. - SEMAPHORE_ADMIN_NAME=admin
  43. - SEMAPHORE_ADMIN_EMAIL=admin@localhost
  44. - SEMAPHORE_ADMIN=admin
  45. - SEMAPHORE_ACCESS_KEY_ENCRYPTION= # add to your access key encryption !
  46. - ANSIBLE_HOST_KEY_CHECKING=false # (optional) change to true if you want to enable host key checking
  47. volumes:
  48. - ./inventory/:/inventory:ro
  49. - ./authorized-keys/:/authorized-keys:ro
  50. - ./config/:/etc/semaphore:rw
  51. restart: unless-stopped
  52. depends_on:
  53. - mysql