Skip to content

Commit df7feb2

Browse files
committed
Initial Glitchtip installation definition
1 parent 2ddac69 commit df7feb2

File tree

7 files changed

+104
-0
lines changed

7 files changed

+104
-0
lines changed
+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
---
2+
3+
- hosts: glitchtip
4+
vars:
5+
host_type: glitchtip
6+
become: true
7+
handlers:
8+
- include_tasks: handlers.yml
9+
roles:
10+
# - role: base_packages
11+
# tags: base_packages
12+
# - role: icpc_fixes
13+
# tags: icpc_fixes
14+
# when: ICPC_IMAGE
15+
# - role: system_fixes
16+
# tags: system_fixes
17+
# - role: hosts
18+
# tags: hosts
19+
- role: docker
20+
tags: docker
21+
- role: glitchtip
22+
tags: glitchtip

provision-contest/ansible/group_vars/onprem/secret.yml.example

+3
Original file line numberDiff line numberDiff line change
@@ -69,3 +69,6 @@ PRESCLIENT_CONTEST: nwerc18
6969

7070
# Sentry DSN URL
7171
# SENTRY_DSN:
72+
73+
# Glitchtip
74+
# GLITCHTIP_SECRET: {some-strong-glitchtip-password}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
glitchtip_port: 8000
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
- name: Restart Glitchtip
3+
community.docker.docker_compose_v2:
4+
project_src: /opt/glitchtip
5+
state: restarted
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
- name: Create directories
3+
become_user: root
4+
file:
5+
path: /opt/glitchtip
6+
state: directory
7+
8+
- name: Create compose file
9+
template:
10+
src: templates/docker-compose.yaml.j2
11+
dest: /opt/glitchtip/docker-compose.yaml
12+
13+
- name: Deploy Glitchtip compose stack
14+
community.docker.docker_compose_v2:
15+
project_src: /opt/glitchtip
16+
files:
17+
- docker-compose.yaml
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
# Uncomment version if using an older version of docker compose
2+
# version: "3.8"
3+
x-environment:
4+
&default-environment
5+
DATABASE_URL: postgres://postgres:postgres@postgres:5432/postgres
6+
SECRET_KEY: {{GLITCHTIP_SECRET}}
7+
PORT: {{glitchtip_port}}
8+
EMAIL_URL: consolemail://
9+
GLITCHTIP_DOMAIN: http://glitchtip.domjudge
10+
DEFAULT_FROM_EMAIL: [email protected]
11+
CELERY_WORKER_AUTOSCALE: "1,1"
12+
CELERY_WORKER_MAX_TASKS_PER_CHILD: "1000"
13+
14+
x-depends_on:
15+
&default-depends_on
16+
- postgres
17+
- redis
18+
19+
services:
20+
postgres:
21+
image: postgres:16-alpine
22+
environment:
23+
POSTGRES_HOST_AUTH_METHOD: "trust" # Consider removing this and setting a password
24+
restart: unless-stopped
25+
volumes:
26+
- pg-data:/var/lib/postgresql/data
27+
redis:
28+
image: redis:7-alpine
29+
restart: unless-stopped
30+
web:
31+
image: glitchtip/glitchtip:v4.1.3
32+
depends_on: *default-depends_on
33+
ports:
34+
- {{glitchtip_port}}:8000
35+
environment: *default-environment
36+
restart: unless-stopped
37+
volumes:
38+
- uploads:/code/uploads
39+
worker:
40+
image: glitchtip/glitchtip:v4.1.3
41+
command: ./bin/run-celery-with-beat.sh
42+
depends_on: *default-depends_on
43+
environment: *default-environment
44+
restart: unless-stopped
45+
volumes:
46+
- uploads:/code/uploads
47+
migrate:
48+
image: glitchtip/glitchtip:v4.1.3
49+
depends_on: *default-depends_on
50+
command: ./bin/run-migrate.sh
51+
environment: *default-environment
52+
53+
volumes:
54+
pg-data:
55+
uploads:
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
*.yml

0 commit comments

Comments
 (0)