Deliver complete semaphore stack. Remove obsolete networks and common mysql.

This commit is contained in:
2022-02-23 07:56:15 +01:00
parent be2ea1412b
commit bc29872c84
4 changed files with 34 additions and 38 deletions

4
automation/.env Normal file
View File

@@ -0,0 +1,4 @@
DB_USER=semaphore
DB_NAME=semaphore
DB_PASS=Zk5FM#*9uAFzt6n6TGD!

View File

@@ -3,33 +3,38 @@ version: "3.9"
networks:
proxy:
external: true
internal:
external: true
semaphore:
name: semaphore
external: false
volumes:
semaphore:
name: semaphore
semaphore-db:
name: semaphore-db
services:
semaphore:
image: ansiblesemaphore/semaphore
container_name: semaphore
environment:
SEMAPHORE_DB_USER: semaphore
SEMAPHORE_DB_PASS: Zk5FM#*9uAFzt6n6TGD!
SEMAPHORE_DB_HOST: mysql8
SEMAPHORE_DB_USER: ${DB_USER}
SEMAPHORE_DB_PASS: ${DB_PASS}
SEMAPHORE_DB_HOST: semaphore-db
SEMAPHORE_DB_PORT: 3306
SEMAPHORE_DB: semaphore
SEMAPHORE_DB: ${DB_NAME}
SEMAPHORE_PLAYBOOKPATH: /tmp/semaphore/
SEMAPHORE_ADMIN_PASSWORD: secret
SEMAPHORE_ADMIN_NAME: Christian Steinle
SEMAPHORE_ADMIN_EMAIL: christiansteinle@arcor.de
SEMAPHORE_ADMIN: chris
SEMAPHORE_ACCESS_KEY_ENCRYPTION: /Rzt40/8gnKzYNDktdtDRZ8FVDJoF5y4Z1fETIylc7Y=
depends_on:
- semaphore-db
restart: unless-stopped
networks:
- proxy
- internal
- semaphore
volumes:
- semaphore:/home/semaphore:rw
labels:
@@ -39,3 +44,21 @@ services:
- "traefik.http.routers.semaphore.service=semaphore"
- "traefik.http.services.semaphore.loadbalancer.server.port=3000"
semaphore-db:
image: mysql:8
container_name: semaphore-db
hostname: semaphore-db
command: --default-authentication-plugin=mysql_native_password
restart: unless-stopped
environment:
MYSQL_ROOT_PASSWORD: ${DB_PASS}
MYSQL_USER: ${DB_USER}
MYSQL_PASSWORD: ${DB_PASS}
MYSQL_DATABASE: ${DB_NAME}
volumes:
- semaphore-db:/var/lib/mysql
networks:
- semaphore
healthcheck:
test: ["CMD-SHELL", "mysqladmin ping -u$${DB_USER} -p$$(DB_PASS)"]