這是本文件的舊版!


安裝 Ansible UI - Semaphore (Docker)

  1. 建立 docker-compose.yml
    services:
      postgres:
        restart: unless-stopped
        image: postgres:14
        hostname: postgres
        volumes: 
          - semaphore-postgres:/var/lib/postgresql/data
        environment:
          POSTGRES_USER: semaphore
          POSTGRES_PASSWORD: semaphore
          POSTGRES_DB: semaphore
      semaphore:
        restart: unless-stopped
        ports:
          - 3000:3000
        image: semaphoreui/semaphore:latest
        environment:
          SEMAPHORE_DB_USER: semaphore
          SEMAPHORE_DB_PASS: semaphore
          SEMAPHORE_DB_HOST: postgres
          SEMAPHORE_DB_PORT: 5432
          SEMAPHORE_DB_DIALECT: postgres
          SEMAPHORE_DB: semaphore
          SEMAPHORE_PLAYBOOK_PATH: /tmp/semaphore/
          SEMAPHORE_ADMIN_PASSWORD: changeme
          SEMAPHORE_ADMIN_NAME: admin
          SEMAPHORE_ADMIN_EMAIL: admin@localhost
          SEMAPHORE_ADMIN: admin
          SEMAPHORE_ACCESS_KEY_ENCRYPTION: gs72mPntFATGJs9qK0pQ0rKtfidlexiMjYCH9gWKhTU=
          SEMAPHORE_LDAP_ACTIVATED: 'no' # if you wish to use ldap, set to: 'yes' 
          SEMAPHORE_LDAP_HOST: dc01.local.example.com
          SEMAPHORE_LDAP_PORT: '636'
          SEMAPHORE_LDAP_NEEDTLS: 'yes'
          SEMAPHORE_LDAP_DN_BIND: 'uid=bind_user,cn=users,cn=accounts,dc=local,dc=shiftsystems,dc=net'
          SEMAPHORE_LDAP_PASSWORD: 'ldap_bind_account_password'
          SEMAPHORE_LDAP_DN_SEARCH: 'dc=local,dc=example,dc=com'
          SEMAPHORE_LDAP_SEARCH_FILTER: "(\u0026(uid=%s)(memberOf=cn=ipausers,cn=groups,cn=accounts,dc=local,dc=example,dc=com))"
        depends_on:
          - postgres
    volumes:
      semaphore-postgres:
  2. 修改資料庫密碼相關項目 POSTGRES_PASSWORD 、 SEMAPHORE_DB_PASS
  3. 修改管理者相關項目 SEMAPHORE_ADMIN_PASSWORD 、 SEMAPHORE_ADMIN_EMAIL
  4. 修改存取密鑰項目 SEMAPHORE_ACCESS_KEY_ENCRYPTION 可使用以下語法產生

    semaphore-44:~# head -c32 /dev/urandom | base64
    EHLA/hOR6YQFrMhsXpfyApgKcT3/kvVxbQR/dGu0aD4=

  5. 啟動 docker compose

    docker compose up -d

  6. 使用 http://server_ip:3000 就可以看到登入畫面
  • tech/alpine_semaphore.1703836094.txt.gz
  • 上一次變更: 2023/12/29 15:48
  • jonathan