File tree 7 files changed +45
-46
lines changed
provision-contest/ansible
files/containers-glitchtip/glitchtip
7 files changed +45
-46
lines changed Original file line number Diff line number Diff line change 1
1
---
2
-
3
2
- hosts : glitchtip
4
3
vars :
5
4
host_type : glitchtip
6
5
become : true
7
6
handlers :
8
7
- include_tasks : handlers.yml
9
8
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
9
+ - role : base_packages
10
+ tags : base_packages
11
+ - role : icpc_fixes
12
+ tags : icpc_fixes
13
+ when : ICPC_IMAGE
14
+ - role : system_fixes
15
+ tags : system_fixes
16
+ - role : hosts
17
+ tags : hosts
19
18
- role : docker
20
19
tags : docker
21
20
- role : glitchtip
Original file line number Diff line number Diff line change
1
+ *
Original file line number Diff line number Diff line change 1
1
---
2
- - block :
3
- - name : Check for existing container
4
- community.docker.docker_image_info :
5
- name : " {{ img_name }}"
6
- register : result
2
+ - name : Load the container from archive if needed
3
+ block :
4
+ - name : Check for existing container
5
+ community.docker.docker_image_info :
6
+ name : " {{ img_name }}"
7
+ register : result
7
8
8
- - block :
9
- - name : Create temp container directory
10
- file :
11
- path : /tmp/dj_ansible
12
- state : directory
13
- owner : root
14
- group : root
15
- mode : 0700
9
+ - name : Transfer and load the container
10
+ block :
11
+ - name : Create temp container directory
12
+ file :
13
+ path : /tmp/dj_ansible
14
+ state : directory
15
+ owner : root
16
+ group : root
17
+ mode : 0700
16
18
17
- - name : Transfer container archive
18
- copy :
19
- src : " {{ item.src }}"
20
- dest : " {{ img_path }}"
21
- owner : root
22
- group : root
23
- mode : 0700
19
+ - name : Transfer container archive
20
+ copy :
21
+ src : " {{ item.src }}"
22
+ dest : " {{ img_path }}"
23
+ owner : root
24
+ group : root
25
+ mode : 0700
24
26
25
- - name : Import container from archive
26
- community.docker.docker_image :
27
- name : " {{ img_name }}"
28
- load_path : " {{ img_path }}"
29
- source : load
30
- when : not result.images
27
+ - name : Import container from archive
28
+ community.docker.docker_image :
29
+ name : " {{ img_name }}"
30
+ load_path : " {{ img_path }}"
31
+ source : load
32
+ when : not result.images
31
33
vars :
32
34
img_name : " {{ item.path | splitext | first }}"
33
35
img_path : " /tmp/dj_ansible/{{ item.path | basename }}"
Original file line number Diff line number Diff line change 20
20
- docker-ce-cli
21
21
- docker-compose-plugin
22
22
- python3-pip
23
-
24
- - name : Install Docker module for Python
25
- pip :
26
- name : docker
23
+ - python3-docker
27
24
28
25
- name : Remove executable bit from "/usr/local/bin/runc"
29
26
file :
Original file line number Diff line number Diff line change 1
- glitchtip_port : 8000
1
+ GLITCHTIP_PORT : 8000
Original file line number Diff line number Diff line change 3
3
community.docker.docker_compose_v2 :
4
4
project_src : /opt/glitchtip
5
5
files :
6
- - docker-compose.yaml
6
+ - docker-compose.yaml
7
7
state : restarted
Original file line number Diff line number Diff line change 3
3
x-environment:
4
4
&default-environment
5
5
DATABASE_URL: postgres://postgres:postgres@postgres:5432/postgres
6
- SECRET_KEY: {{GLITCHTIP_SECRET}}
7
- PORT: {{glitchtip_port }}
6
+ SECRET_KEY: {{ GLITCHTIP_SECRET }}
7
+ PORT: {{ GLITCHTIP_PORT }}
8
8
EMAIL_URL: consolemail://
9
- GLITCHTIP_DOMAIN: http://glitchtip:{{glitchtip_port }}
9
+ GLITCHTIP_DOMAIN: http://glitchtip:{{ GLITCHTIP_PORT }}
10
10
DEFAULT_FROM_EMAIL: email@glitchtip
11
11
CELERY_WORKER_AUTOSCALE: "1,1"
12
12
CELERY_WORKER_MAX_TASKS_PER_CHILD: "1000"
@@ -31,7 +31,7 @@ services:
31
31
image: glitchtip/glitchtip:v4.1.3
32
32
depends_on: *default-depends_on
33
33
ports:
34
- - {{glitchtip_port }}:{{glitchtip_port }}
34
+ - {{ GLITCHTIP_PORT }}:{{ GLITCHTIP_PORT }}
35
35
environment: *default-environment
36
36
restart: unless-stopped
37
37
volumes:
You can’t perform that action at this time.
0 commit comments