Skip to content

Commit 4024108

Browse files
committed
Fix hermes deployment
1 parent f141461 commit 4024108

File tree

3 files changed

+18
-9
lines changed

3 files changed

+18
-9
lines changed

roles/hermes/handlers/main.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
- name: Restart hermes
3+
community.docker.docker_compose_v2:
4+
project_src: "{{ hermes_working_directory }}"
5+
state: present
6+
become: true

roles/hermes/tasks/main.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
src: "docker-compose.yml.j2"
1212
dest: "{{ hermes_working_directory }}/docker-compose.yml"
1313
mode: '0600'
14+
notify: Restart hermes
1415

1516
- name: Create Google certificate file
1617
ansible.builtin.copy:
@@ -20,6 +21,7 @@
2021
owner: "root"
2122
group: "root"
2223
become: true
24+
notify: Restart hermes
2325

2426
- name: Create Apple certificate file
2527
ansible.builtin.copy:
@@ -28,4 +30,5 @@
2830
mode: "0600"
2931
owner: "root"
3032
group: "root"
31-
become: true
33+
become: true
34+
notify: Restart hermes
Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
services:
22
hermes:
3-
image: ghcr.io/ls1intum/hermes:"{{ hermes_version }}"
3+
image: ghcr.io/ls1intum/hermes:{{ hermes_version }}
44
container_name: hermes
55
ports:
66
- "{{ hermes_port }}:8080"
77
environment:
8-
- APNS_CERTIFICATE_PWD="{{ hermes_apns_certificate_password }}"
9-
- APNS_PROD_ENVIRONMENT="{{ hermes_apns_prod_environment }}"
10-
- APNS_CERTIFICATE_PATH="{{ hermes_working_directory }}/{{ hermes_apns_certificate_path }}"
11-
- GOOGLE_APPLICATION_CREDENTIALS="{{ hermes_working_directory }}/{{ hermes_google_application_credentials_json_path }}"
8+
- APNS_CERTIFICATE_PWD={{ hermes_apns_certificate_password }}
9+
- APNS_PROD_ENVIRONMENT={{ hermes_apns_prod_environment }}
10+
- APNS_CERTIFICATE_PATH=/key/artemis-apns.p12
11+
- GOOGLE_APPLICATION_CREDENTIALS=/firebase.json
1212
volumes:
13-
- ${APNS_CERT_PATH}:/key/artemis-apns.p12
14-
- ${GOOGLE_APPLICATION_CREDENTIALS_JSON}:/firebase.json
15-
restart: on-failure
13+
- {{ hermes_working_directory }}/{{ hermes_apns_certificate_path }}:/key/artemis-apns.p12:ro
14+
- {{ hermes_working_directory }}/{{ hermes_google_application_credentials_json_path }}:/firebase.json:ro
15+
restart: on-failure

0 commit comments

Comments
 (0)