From 2bcec3dcb4ec0b635ffb114882a4776885c3b58a Mon Sep 17 00:00:00 2001 From: chris Date: Mon, 22 Nov 2021 08:24:37 +0100 Subject: [PATCH] Introduce semaphore for task automation. --- automation/docker-compose.yaml | 41 ++++++++++++++++++++++++++++++++++ mysql_databases.sql | 8 +++---- 2 files changed, 45 insertions(+), 4 deletions(-) create mode 100644 automation/docker-compose.yaml diff --git a/automation/docker-compose.yaml b/automation/docker-compose.yaml new file mode 100644 index 0000000..44fdb17 --- /dev/null +++ b/automation/docker-compose.yaml @@ -0,0 +1,41 @@ +version: "3.9" + +networks: + proxy: + external: true + internal: + external: true + +volumes: + semaphore: + name: semaphore + +services: + semaphore: + image: ansiblesemaphore/semaphore + container_name: semaphore + environment: + SEMAPHORE_DB_USER: semaphore + SEMAPHORE_DB_PASS: Zk5FM#*9uAFzt6n6TGD! + SEMAPHORE_DB_HOST: mysql8 + SEMAPHORE_DB_PORT: 3306 + SEMAPHORE_DB: semaphore + SEMAPHORE_PLAYBOOKPATH: /tmp/semaphore/ + SEMAPHORE_ADMIN_PASSWORD: secret + SEMAPHORE_ADMIN_NAME: Christian Steinle + SEMAPHORE_ADMIN_EMAIL: christiansteinle@arcor.de + SEMAPHORE_ADMIN: chris + networks: + - proxy + - internal + volumes: + - semaphore:/home/semaphore:rw + + depends_on: + - mysql8 + labels: + - "traefik.enable=true" + - "traefik.http.routers.semaphore.entrypoints=web" + - "traefik.http.routers.semaphore.rule=Host(`semaphore.lan`)" + - "traefik.http.routers.semaphore.service=semaphore" + - "traefik.http.services.semaphore.loadbalancer.server.port=3000" diff --git a/mysql_databases.sql b/mysql_databases.sql index 034081e..71a6d4f 100644 --- a/mysql_databases.sql +++ b/mysql_databases.sql @@ -1,14 +1,14 @@ # create the databases -CREATE DATABASE IF NOT EXISTS `nextcloud`; CREATE DATABASE IF NOT EXISTS `bookstack`; CREATE DATABASE IF NOT EXISTS `kimai`; +CREATE DATABASE IF NOT EXISTS `semaphore`; # create users and privileges -CREATE USER 'nextcloud'@'%' IDENTIFIED BY 'jX9hKI2POvt1VrjVbBs4'; -GRANT ALL PRIVILEGES ON nextcloud.* TO 'nextcloud'@'%'; - CREATE USER 'bookstack'@'%' IDENTIFIED BY 'sdfl39302klsdjf'; GRANT ALL PRIVILEGES ON bookstack.* TO 'bookstack'@'%'; CREATE USER 'kimai'@'%' IDENTIFIED BY 'xXW5dnQoMpAmdXrQgUgU'; GRANT ALL PRIVILEGES ON kimai.* TO 'kimai'@'%'; + +CREATE USER 'semaphore'@'%' IDENTIFIED BY 'Zk5FM#*9uAFzt6n6TGD!'; +GRANT ALL PRIVILEGES ON semaphore.* TO 'semaphore'@'%';