Skip to content

Commit

Permalink
Merge pull request #28 from usegalaxy-au/dev
Browse files Browse the repository at this point in the history
Add CSRF_TRUSTED_ORIGINS and fix certbot renew
  • Loading branch information
neoformit authored Jan 15, 2025
2 parents e2753e2 + 4c54651 commit 7c25c44
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 3 deletions.
6 changes: 3 additions & 3 deletions ansible/roles/galaxy_labs_engine/tasks/certbot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,15 +48,15 @@
register: certbot_certificates
tags: certbot

always:
- name: setup certbot renew cron job
cron:
name: "certbot-renew"
minute: "0"
hour: "0"
job: "cd {{ config_root }} && docker compose --profile certbot run --rm certbot renew"
tags: certbot
job: "sudo certbot renew --webroot --webroot-path /var/www/certbot/"
when: certbot_ssl

always:
- name: run docker compose down
shell: >
docker compose --profile certbot down
Expand Down
6 changes: 6 additions & 0 deletions ansible/roles/galaxy_labs_engine/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@
ansible.builtin.apt:
update_cache: yes

- name: install cerbot
ansible.builtin.apt:
name: certbot
state: present
tags: always

- name: Docker pull labs-engine image
ansible.builtin.docker_image:
name: "{{ labs_engine_docker_image }}"
Expand Down
4 changes: 4 additions & 0 deletions app/app/settings/prod.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@
(ADMIN_NAME, ADMIN_EMAIL),
]

CSRF_TRUSTED_ORIGINS = [
f"https://{HOSTNAME}",
]

# Use manifest to manage static file versions for cache busting:
STORAGES = {
"default": {
Expand Down

0 comments on commit 7c25c44

Please sign in to comment.