Compare commits

17 Commits

Author SHA1 Message Date
sotos
831ab77fed Update
Some checks failed
CI/CD Pipeline / lint (push) Failing after 29s
CI/CD Pipeline / deploy (push) Has been cancelled
2025-12-19 10:49:45 +01:00
sotos
d1f7bf05ea asd
Some checks failed
CI/CD Pipeline / lint (push) Has been cancelled
CI/CD Pipeline / deploy (push) Successful in 1m28s
2025-12-19 08:00:41 +01:00
sotos
ccc1bfd366 Update
Some checks failed
CI/CD Pipeline / lint (push) Has been cancelled
CI/CD Pipeline / deploy (push) Failing after 41s
2025-12-19 07:58:10 +01:00
sotos
b5e4a462db das
Some checks failed
CI/CD Pipeline / lint (push) Has been cancelled
CI/CD Pipeline / deploy (push) Failing after 1m20s
2025-12-18 15:37:04 +01:00
sotos
4c4b509b90 asd
Some checks failed
CI/CD Pipeline / lint (push) Has been cancelled
CI/CD Pipeline / deploy (push) Failing after 1m20s
2025-12-18 15:33:26 +01:00
sotos
5940099978 asd
Some checks failed
CI/CD Pipeline / lint (push) Failing after 57s
CI/CD Pipeline / deploy (push) Failing after 1m21s
2025-12-18 15:29:47 +01:00
sotos
bb88b190ee update
Some checks failed
CI/CD Pipeline / lint (push) Failing after 18s
CI/CD Pipeline / deploy (push) Successful in 1m24s
2025-12-17 12:14:53 +01:00
sotos
7f100d85d1 update
Some checks failed
CI/CD Pipeline / lint (push) Has been cancelled
CI/CD Pipeline / deploy (push) Successful in 1m15s
2025-12-17 11:35:01 +01:00
sotos
6931df8463 Update
Some checks failed
CI/CD Pipeline / lint (push) Failing after 18s
CI/CD Pipeline / deploy (push) Failing after 39s
2025-12-17 11:32:59 +01:00
sotos
a339ad8d9c update
Some checks failed
CI/CD Pipeline / lint (push) Failing after 18s
CI/CD Pipeline / deploy (push) Failing after 56s
2025-12-17 11:28:21 +01:00
sotos
a975f69891 Update
Some checks failed
CI/CD Pipeline / lint (push) Failing after 18s
CI/CD Pipeline / deploy (push) Failing after 1m23s
2025-12-17 11:13:38 +01:00
sotos
fa8afa87e5 Merge branch 'main' of https://dns.s-martika.com/smartika/Wordpress-Ansible
Some checks failed
CI/CD Pipeline / lint (push) Failing after 19s
CI/CD Pipeline / deploy (push) Failing after 47s
2025-12-17 11:03:39 +01:00
sotos
46582b611d Update 2025-12-17 11:03:08 +01:00
Robert Ose
ddcc2ace6a Merge branch 'main' of https://dns.s-martika.com/smartika/Wordpress-Ansible
Some checks failed
CI/CD Pipeline / lint (push) Failing after 17s
CI/CD Pipeline / deploy (push) Failing after 1m2s
2025-12-17 10:54:08 +01:00
Robert Ose
dc23f3ac69 update 2025-12-17 10:53:59 +01:00
sotos
1e1d4913a8 update
Some checks failed
CI/CD Pipeline / lint (push) Failing after 18s
CI/CD Pipeline / deploy (push) Failing after 42s
2025-12-17 10:48:06 +01:00
sotos
4f77663f89 Update 2025-12-17 10:44:03 +01:00
10 changed files with 124 additions and 64 deletions

View File

@@ -3,7 +3,7 @@ name: CI/CD Pipeline
"on":
push:
branches: [main, flip_dev]
branches: [main, flip_dev, hannes]
jobs:
lint:
@@ -38,6 +38,8 @@ jobs:
apt-get update && apt-get install -y python3 python3-pip openssh-client bash git
pip3 install --upgrade pip
pip3 install ansible
ansible-galaxy collection install community.docker:">=3.5.0"
- name: Setup SSH
shell: bash

View File

@@ -1,24 +1,8 @@
---
- hosts: all
become: true
roles:
- docker/snake
vars:
app_dir: /opt/docker/snake
snake_image: dns.s-martika.com/smartika/snake-game:2.0
tasks:
- name: Create app directory
file:
path: "{{ app_dir }}"
state: directory
- name: Copy compose file
copy:
src: "{{ playbook_dir }}/roles/docker/snake/files/docker-compose.yaml"
dest: "{{ app_dir }}/docker-compose.yaml"
- name: Start snake container
command: docker compose up -d
args:
chdir: "{{ app_dir }}"
roles:
- role: docker/snake

View File

@@ -13,7 +13,7 @@
update_cache: true
- name: Install Docker
shell: curl -fsSL https://get.docker.com | sh
shell: curl -fsSL https://get.docker.com | bash
args:
creates: /usr/bin/docker

View File

@@ -1,21 +1,33 @@
---
- hosts: all
become: true
vars:
monitor_dir: /opt/docker/monitoring
docker_network: monitoring
tasks:
- name: Create monitoring directory
- name: Ensure monitoring directory exists
file:
path: "{{ monitor_dir }}"
state: directory
owner: root
group: root
mode: '0755'
- name: Copy monitoring stack
copy:
src: ../../docker/monitoring/
dest: "{{ monitor_dir }}"
owner: root
group: root
mode: '0755'
- name: Start monitoring
command: docker compose up -d
args:
chdir: "{{ monitor_dir }}"
- name: Ensure monitoring Docker network exists
docker_network:
name: "{{ docker_network }}"
state: present
- name: Start monitoring stack
community.docker.docker_compose_v2:
project_src: "{{ monitor_dir }}"
project_name: monitoring
state: present

View File

@@ -0,0 +1,11 @@
- name: Ensure snake_net exists for monitoring
docker_network:
name: snake_net
state: present
- name: Start monitoring stack
community.docker.docker_compose:
project_src: /opt/docker/monitoring
project_name: monitoring
state: present
restarted: true

View File

@@ -3,7 +3,7 @@
gitea_user: smartika
gitea_token: "idNu783r4ub7ZXi"
snake_image: dns.s-martika.com/smartika/snake-game
snake_tag: "1.0"
snake_image: dns.s-martika.com/smartika/snake-game:2.0
app_dir: /opt/docker/snake
snake_container_name: snake-game
snake_port: 8080

View File

@@ -2,8 +2,12 @@
version: "3.8"
services:
snake:
image: dns.s-martika.com/smartika/snake-game:1.0
image: dns.s-martika.com/smartika/snake-game:2.0
container_name: snake-game777
restart: unless-stopped
ports:
- "8080:80"
networks:
snake_net:
external: true

View File

@@ -1,24 +1,43 @@
---
- name: Ensure app directory exists
file:
path: "{{ app_dir }}"
state: directory
owner: root
group: root
mode: '0755'
- name: Ensure snake_net exists
docker_network:
name: snake_net
state: present
# Login to private registry
- name: Login to private registry
docker_login:
registry_url: dns.s-martika.com
username: "{{ gitea_user }}"
password: "{{ gitea_token }}"
# Pull latest image
- name: Pull snake-game image
docker_image:
name: dns.s-martika.com/smartika/snake-game
tag: "1.0"
name: "{{ snake_image }}"
source: pull
# Run container
- name: Run snake-game container
docker_container:
name: snake-game
image: dns.s-martika.com/smartika/snake-game:2.0
image: "{{ snake_image }}"
state: started
privileged: true
restart_policy: always
restart_policy: unless-stopped
ports:
- "8080:8080" # host:container
- "8080:80" # host port → container port
pull: yes
networks:
- name: snake_net

View File

@@ -1,33 +1,43 @@
---
version: '3.8'
services:
prometheus:
image: prom/prometheus:latest
volumes:
- ./prometheus.yaml:/etc/prometheus/prometheus.yml:ro
ports:
- "9090:9090"
networks:
- snake_net
restart: unless-stopped
grafana:
image: grafana/grafana:latest
volumes:
- ./grafana/provisioning:/etc/grafana/provisioning:ro
- grafana_data:/var/lib/grafana
environment:
GF_SECURITY_ADMIN_PASSWORD: "admin"
GF_DASHBOARDS_DEFAULT_HOME_DASHBOARD_PATH: /var/lib/grafana/dashboards/home.json
ports:
- "3000:3000"
networks:
- snake_net
restart: unless-stopped
volumes:
grafana_data:
networks:
snake_net:
external: true
services:
prometheus:
image: prom/prometheus:latest
container_name: monitoring-prometheus
ports:
- "9090:9090"
volumes:
- ./prometheus.yaml:/etc/prometheus/prometheus.yml
networks:
- snake_net
grafana:
image: grafana/grafana:latest
container_name: monitoring-grafana
ports:
- "3000:3000"
volumes:
- ./grafana/provisioning:/etc/grafana/provisioning
- ./grafana/dashboards:/var/lib/grafana/dashboards
networks:
- snake_net
nginx-exporter:
image: nginx/nginx-prometheus-exporter:latest
container_name: nginx-exporter
ports:
- "9113:9113"
networks:
- snake_net
blackbox-exporter:
image: prom/blackbox-exporter:latest
container_name: blackbox-exporter
ports:
- "9115:9115"
networks:
- snake_net

View File

@@ -6,3 +6,21 @@ scrape_configs:
- job_name: "prometheus"
static_configs:
- targets: ["localhost:9090"]
- job_name: 'nginx'
static_configs:
- targets: ['nginx-prometheus-exporter:9113']
- job_name: 'snake-game'
metrics_path: /probe
params:
module: [http_2xx] # probe returns 1 if HTTP 200
static_configs:
- targets: ['snake-game:8080'] # snake game container + port
relabel_configs:
- source_labels: [__address__]
target_label: __param_target
- source_labels: [__param_target]
target_label: instance
- target_label: __address__
replacement: blackbox-exporter:9115