compose.yaml 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. ---
  2. volumes:
  3. semaphore-mysql:
  4. driver: local
  5. services:
  6. mysql:
  7. image: docker.io/library/mysql:8.4
  8. hostname: mysql
  9. volumes:
  10. - semaphore-mysql:/var/lib/mysql
  11. environment:
  12. - MYSQL_RANDOM_ROOT_PASSWORD=yes
  13. - MYSQL_DATABASE=semaphore
  14. - MYSQL_USER=semaphore
  15. - MYSQL_PASSWORD=secret-password # change!
  16. restart: unless-stopped
  17. semaphore:
  18. container_name: ansiblesemaphore
  19. image: docker.io/semaphoreui/semaphore:v2.14.12
  20. user: "${UID}:${GID}"
  21. ports:
  22. - 3000:3000
  23. environment:
  24. - SEMAPHORE_DB_USER=semaphore
  25. - SEMAPHORE_DB_PASS=secret-password # change!
  26. - SEMAPHORE_DB_HOST=mysql
  27. - SEMAPHORE_DB_PORT=3306
  28. - SEMAPHORE_DB_DIALECT=mysql
  29. - SEMAPHORE_DB=semaphore
  30. - SEMAPHORE_PLAYBOOK_PATH=/tmp/semaphore/
  31. - SEMAPHORE_ADMIN_PASSWORD=secret-admin-password # change!
  32. - SEMAPHORE_ADMIN_NAME=admin
  33. - SEMAPHORE_ADMIN_EMAIL=admin@localhost
  34. - SEMAPHORE_ADMIN=admin
  35. - SEMAPHORE_ACCESS_KEY_ENCRYPTION= # add to your access key encryption !
  36. - ANSIBLE_HOST_KEY_CHECKING=false # (optional) change to true if you want to enable host key checking
  37. volumes:
  38. - ./inventory/:/inventory:ro
  39. - ./authorized-keys/:/authorized-keys:ro
  40. - ./config/:/etc/semaphore:rw
  41. restart: unless-stopped
  42. depends_on:
  43. - mysql