# https://github.com/ChristianLempa/videos/blob/main/ansiblesemaphore-tutorial/docker-compose.yaml services: postgres: container_name: ansible-postgres restart: unless-stopped image: postgres:14 # postgres:15.1-alpine hostname: postgres volumes: - semaphore-postgres:/var/lib/postgresql/data environment: POSTGRES_USER: semaphore POSTGRES_PASSWORD: semaphore POSTGRES_DB: semaphore networks: - ansible pgadmin: container_name: ansible-pgadmin image: dpage/pgadmin4:7.6 restart: unless-stopped environment: PGADMIN_DEFAULT_EMAIL: y.m.lima19@gmail.com PGADMIN_DEFAULT_PASSWORD: semaphore PGADMIN_CONFIG_SERVER_MODE: 'False' depends_on: - postgres networks: - ansible volumes: - pgadmin-data:/var/lib/pgadmin semaphore: container_name: ansible-semaphore build: context: . # Directory containing the Dockerfile dockerfile: Dockerfile.semaphore # Name of the Dockerfile restart: always # user: "${UID}:${GID}" # Use root is not the best approach, we need soon create a user and group to run this container. user: "root" # change to your user id and group id, this is to avoid permission issues # image: semaphoreui/semaphore:v2.9.75 # v2.9.28 environment: TZ: Europe/Berlin SEMAPHORE_SCHEDULE_TIMEZONE: Europe/Berlin 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: 12345678 SEMAPHORE_ADMIN_NAME: admin SEMAPHORE_ADMIN_EMAIL: y.m.lima19@gmail.com SEMAPHORE_ADMIN: admin #OLD from access_key_encryption in config file => eMsZ2Zk3C/1DORYCLRwS/pO/NKsthZhuckTRRxIn+PM= SEMAPHORE_ACCESS_KEY_ENCRYPTION: BvmQlUSZ9BoUK7x2U7LoyKh7uyxLNeaPwvryzhjs2pY= # DONT CHANGE UNLESS YOU KNOW WHAT YOU ARE DOING!!!!!!!!!! ANSIBLE_HOST_KEY_CHECKING: false # (optional) change to true if you want to enable host key checking, fingerprint will be saved in /etc/semaphore/known_hosts # ANSIBLE_USER: ansible #ssh_args -o # ANSIBLE_SSH_ARGS: '-o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null' # ForwardAgent # ANSIBLE_SSH_ARGS: '-o ForwardAgent=yes' # scp_if_ssh # ANSIBLE_SCP_IF_SSH: 'True' # 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: "(&(uid=%s)(memberOf=cn=ipausers,cn=groups,cn=accounts,dc=local,dc=example,dc=com))" volumes: - ./semaphore-config/config/:/etc/semaphore:rw # This is working fine!!! depends_on: - postgres networks: - ansible node_exporter: image: quay.io/prometheus/node-exporter:latest container_name: node_exporter network_mode: host pid: host restart: unless-stopped command: - "--path.procfs=/host/proc" - "--path.sysfs=/host/sys" - "--path.rootfs=/host" - "--collector.filesystem.ignored-mount-points=^/(sys|proc|dev)($$|/)" volumes: - "/proc:/host/proc:ro" - "/sys:/host/sys:ro" - "/:/host:ro,rslave" https_portal: container_name: https_portal image: "steveltn/https-portal:1.21" restart: unless-stopped user: "root" networks: - ansible # internal network ports: - "80:80" - "443:443" environment: STAGE: "production" # Use Let's Encrypt production server WEBSOCKET: "true" # Enable websocket support DEBUG: "true" RENEW_MARGIN_DAYS: 30 CLIENT_MAX_BODY_SIZE: 0 # FORCE_RENEW: 'true' DOMAINS: > ansible.phx-erp.de -> semaphore:3000, pgadmin-ansible.phx-erp.de -> pgadmin:80 volumes: - ./https_portal/data:/var/lib/https-portal # ssl_certs, vhost.d, htdocs - ./https_portal/log:/var/log/nginx # nginx logs depends_on: - semaphore - pgadmin volumes: semaphore-postgres: pgadmin-data: networks: ansible: name: ansible driver: bridge