Skip to content

Commit

Permalink
updates
Browse files Browse the repository at this point in the history
  • Loading branch information
brpaz committed Aug 27, 2023
1 parent b783338 commit 029ab55
Show file tree
Hide file tree
Showing 5 changed files with 89 additions and 10 deletions.
9 changes: 9 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,14 @@
"**/.hg/store/**": true,
".flatpak/**": true,
"_build/**": true
},
"yaml.schemas": {
"/home/bruno/Code/Personal/other/schemastore/src/schemas/json/hadolint.json": ".hadolint.yaml",
"kubernetes": "k8s/*.yaml",
"/home/bruno/Code/Personal/other/schemastore/src/schemas/json/container-structure-test.json": "structure-tests.yaml",
"https://raw.githubusercontent.com/ansible/ansible-lint/main/src/ansiblelint/schemas/ansible.json#/$defs/tasks": [
"file:///home/bruno/Code/Personal/other/my-linux-setup/provision/tasks/docker-apps/traefik.yml",
"file:///home/bruno/Code/Personal/other/my-linux-setup/provision/tasks/docker-apps/prometheus.yml"
]
}
}
6 changes: 6 additions & 0 deletions provision/tasks/docker-apps/_main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,9 @@

- import_tasks: 'node-exporter.yml'
tags: ['node-exporter', 'docker-monitoring-stack']

- import_tasks: 'sourcegraph.yml'
tags: ['sourcegraph']

- import_tasks: 'flame.yml'
tags: ['flame']
11 changes: 1 addition & 10 deletions provision/tasks/docker-apps/cadvisor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,7 @@
- name: monitoring
- name: traefik-public
volumes:
- /:/rootfs:ro
- /var/run:/var/run:ro
- /sys:/sys:ro
- /var/lib/docker/:/var/lib/docker:ro
- /dev/kmsg:/dev/kmsg
labels:
traefik.enable: "true"
traefik.http.routers.cadvisor.rule: "Host(`cadvisor.docker`)"
traefik.http.routers.cadvisor.entrypoints: "web"
traefik.http.services.cadvisor.loadbalancer.server.port: "8080"
traefik.docker.network: traefik-public

traefik.enable: "false"

23 changes: 23 additions & 0 deletions provision/tasks/docker-apps/flame.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@

- name: Flame | Create volume
community.docker.docker_volume:
name: flame_data
state: present
- name: Flame | Start container
community.docker.docker_container:
name: flame
image: pawelmalak/flame:2.3.1
restart_policy: "unless-stopped"
networks:
- name: traefik-public
volumes:
- "flame_data:/app/data"
- "/var/run/docker.sock:/var/run/docker.sock"
env:
PASSWORD: "admin"
labels:
traefik.enable: "true"
traefik.http.routers.flame.rule: "Host(`flame.docker`)"
traefik.http.routers.flame.tls: "false"
traefik.http.routers.flame.entrypoints: "web"
traefik.http.services.flame.loadbalancer.server.port: "5005"
50 changes: 50 additions & 0 deletions provision/tasks/docker-apps/sourcegraph.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
- name: Sourcegraph | Ensure Sourcegraph data volume is present
community.docker.docker_volume:
name: sourcegraph_data
state: present

- name: Sourcegraph | Create configuration directory
ansible.builtin.file:
path: /etc/sourcegraph
state: directory
mode: "0755"
become: true

- name: Sourcegraph | Create network
community.docker.docker_network:
name: sourcegraph
state: present

- name: Sourcegraph | Start Server container
community.docker.docker_container:
name: sourcegraph
image: sourcegraph/server:5.1.7
restart_policy: "unless-stopped"
networks:
- name: sourcegraph
- name: traefik-public
volumes:
- "sourcegraph_data:/var/opt/sourcegraph sourcegraph/"
- "/etc/sourcegraph/:/etc/sourcegraph/"
env:
DISABLE_OBSERVABILITY: "true"
labels:
traefik.enable: "true"
traefik.http.routers.sourcegraph.rule: "Host(`sg.docker`)"
traefik.http.routers.sourcegraph.tls: "false"
traefik.http.routers.sourcegraph.entrypoints: "web"
traefik.http.services.sourcegraph.loadbalancer.server.port: "7080"

- name: Sourcegraph | Start Serve git
community.docker.docker_container:
name: sourcegraph-serv-git
image: sourcegraph/src-cli:5.1
command: serve-git /data/repos
restart_policy: "unless-stopped"
networks:
- name: sourcegraph
volumes:
- '~/Code:/data/repos'
labels:
traefik.enable: "true"
traefik.docker.network: traefik-public

0 comments on commit 029ab55

Please sign in to comment.