diff --git a/mariadb/docker-compose.yml b/mariadb/docker-compose.yml index 084000d..58e6ddb 100644 --- a/mariadb/docker-compose.yml +++ b/mariadb/docker-compose.yml @@ -6,8 +6,8 @@ services: restart: unless-stopped environment: - MARIADB_DATABASE=${MARIADB_MARIADB_DATABASE:-mydb} - - MARIADB_PASSWORD=${MARIADB_MARIADB_PASSWORD:-AlsoChangeThisPassword} - MARIADB_ROOT_PASSWORD=${MARIADB_MARIADB_ROOT_PASSWORD:-ChangeThisPassword} - MARIADB_USER=${MARIADB_MARIADB_USER:-dbuser} + - MARIADB_PASSWORD=${MARIADB_MARIADB_PASSWORD:-AlsoChangeThisPassword} volumes: - - ${VOL_PATH:-./data/}mariadb_data:/var/lib/mysql + - ${VOL_PATH:-./data/}/mariadb_data:/var/lib/mysql diff --git a/semaphore/README.md b/semaphore/README.md index 961fa01..6c4a5a1 100644 --- a/semaphore/README.md +++ b/semaphore/README.md @@ -1,17 +1,18 @@ # Semaphore -Last Updated: Sat August 31, 2024 20:32:09 PDT In progress, do data dir. ## Overview Docker Hub: https://hub.docker.com/r/semaphoreui/semaphore Project: https://semaphoreui.com/ -Docker Compose Example: https://docs.semui.co/administration-guide/installation#docker +Docker Compose Example: https://docs.semaphoreui.com/administration-guide/installation/#docker Proxy Port: 3000 ## Notes -Trouble shooting -The trick to getting this going is loggin into the container and running -semaphore commands -you can generate the config.json file that way +Setting up ssh keys is a pain, a volume is setup to include your credentials. +make sure the permissions are set to user 1001. + +### SEMAPHORE_ACCESS_KEY_ENCRYPTION + +must generate this way: head -c32 /dev/urandom | base64 diff --git a/semaphore/config/config.json b/semaphore/config/config.json deleted file mode 100644 index 7953a43..0000000 --- a/semaphore/config/config.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "bolt": { - "host": "/home/ubuntu/semaphore.bolt" - }, - "dialect": "bolt", - "port": "", - "interface": "", - "tmp_path": "/tmp/semaphore", - "cookie_hash": "*****", - "cookie_encryption": "*****", - "access_key_encryption": "*****", - "email_sender": "", - "email_host": "", - "email_port": "", - "web_host": "", - "ldap_binddn": "", - "ldap_bindpassword": "", - "ldap_server": "", - "ldap_searchdn": "", - "ldap_searchfilter": "", - "ldap_mappings": { - "dn": "", - "mail": "", - "uid": "", - "cn": "" - }, - "telegram_chat": "", - "telegram_token": "", - "concurrency_mode": "", - "max_parallel_tasks": 0, - "email_alert": false, - "telegram_alert": false, - "slack_alert": false, - "slack_url": "", - "rocketchat_alert": false, - "rocketchat_url": "", - "ldap_enable": false, - "ldap_needtls": false - } \ No newline at end of file diff --git a/semaphore/docker-compose.yml b/semaphore/docker-compose.yml index 22469e9..131b10a 100644 --- a/semaphore/docker-compose.yml +++ b/semaphore/docker-compose.yml @@ -1,18 +1,24 @@ version: "3.4" services: + semaphore: image: ${SEMAPHORE_IMAGE:-semaphoreui/semaphore:latest} environment: - SEMAPHORE_DB_DIALECT: ${SEMAPHORE_DB_DIALECT:-bolt} + SEMAPHORE_DB_USER: ${SEMAPHORE_DB_USER:-semaphore} + SEMAPHORE_DB_PASS: ${SEMAPHORE_DB_PASS:-semaphorepass} + SEMAPHORE_DB_HOST: mariadb + SEMAPHORE_DB_PORT: 3306 + SEMAPHORE_DB_DIALECT: mysql + SEMAPHORE_DB: semaphore SEMAPHORE_PLAYBOOK_PATH: ${SEMAPHORE_PLAYBOOK_PATH:-/tmp/semaphore/} SEMAPHORE_ADMIN_PASSWORD: ${SEMAPHORE_ADMIN_PASSWORD:-changeadmin1234} SEMAPHORE_ADMIN_NAME: ${SEMAPHORE_ADMIN_NAME:-admin} SEMAPHORE_ADMIN_EMAIL: ${SEMAPHORE_ADMIN_EMAIL:-admin@localhost} + SEMAPHORE_ADMIN: admin SEMAPHORE_ACCESS_KEY_ENCRYPTION: ${SEMAPHORE_ACCESS_KEY_ENCRYPTION:-dfTa9mOCsaoM1zZ+YBE+eGSZnEB0sXvHePhatj9ohuk=} - SEMAPHORE_LDAP_ACTIVATED: ${SEMAPHORE_LDAP_ACTIVATED:-no} + SEMAPHORE_LDAP_ACTIVATED: 'no' volumes: - - ${CONFIG_VOL:-./config}/config.json:/home/semaphore/config.json - #- ./config/ssh/:/home/semaphore/.ssh - ports: - - ${SEMAPHORE_PORT:-3000}:3000 + - ${VOL_PATH}/semaphore:${SEMAPHORE_PLAYBOOK_PATH:-/tmp/semaphore/} + - ${VOL_CONFIG_PATH:-./config}/ssh/:/home/semaphore/.ssh/ + - ${VOL_CONFIG_PATH:-./config}/etchosts:/etc/hosts diff --git a/semaphore/sample-extends.yml b/semaphore/sample-extends.yml index 71d85e9..981d6b0 100644 --- a/semaphore/sample-extends.yml +++ b/semaphore/sample-extends.yml @@ -5,3 +5,9 @@ services: extends: file: ${COOKBOOK}/semaphore/docker-compose.yml service: semaphore + + monica-db: + extends: + file: ${COOKBOOK}/mariadb/docker-compose.yml + service: mariadb + \ No newline at end of file diff --git a/semaphore/sample.env b/semaphore/sample.env index 090b496..6899c37 100644 --- a/semaphore/sample.env +++ b/semaphore/sample.env @@ -1,15 +1,14 @@ -COOKBOOK=/git/docker-compose-cookbooks #HELP: cookbooks -VOL_CONFIG_PATH=./config #HELP: configpath -VOL_PATH=./data #HELP: volpath +COOKBOOK=/git/docker-compose-cookbooks TZ=America/Vancouver +VOL_CONFIG_PATH=./config +VOL_PATH=./data + # semaphore SEMAPHORE_IMAGE=semaphoreui/semaphore:latest -SEMAPHORE_ACCESS_KEY_ENCRYPTION=1234567890123456789012345678901234567890 #HELP: gen32 -SEMAPHORE_PORT=3000 +SEMAPHORE_ACCESS_KEY_ENCRYPTION=1234567890123456789012345678901234567890 SEMAPHORE_ADMIN_EMAIL=example@example.com -SEMAPHORE_DB_DIALECT=bolt -SEMAPHORE_LDAP_ACTIVATED=no SEMAPHORE_ADMIN_NAME=admin -SEMAPHORE_ADMIN_EMAIL=admin@localhost SEMAPHORE_ADMIN_PASSWORD=password -SEMAPHORE_PLAYBOOK_PATH=/tmp/semaphore/ \ No newline at end of file +SEMAPHORE_PLAYBOOK_PATH=/tmp/semaphore/ +SEMAPHORE_DB_USER: semaphore +SEMAPHORE_DB_PASS: semaphore