From 310649b9735822eee4f962bbb3f9207c33989f89 Mon Sep 17 00:00:00 2001 From: Laur Ivan Date: Sun, 11 Dec 2022 00:55:45 +0100 Subject: [PATCH] fix!: Make paths absolute. Breaking change! --- tasks/main.yml | 12 ++++++------ templates/docker-compose.yml.j2 | 12 ++++++------ 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/tasks/main.yml b/tasks/main.yml index 5d7a0ed..f146233 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -21,10 +21,10 @@ group: "{% if outline_gid %}{{ outline_gid }}{% else %}{{ ansible_effective_group_id }}{% endif %}" mode: "0750" with_items: - - "{{ outline_setup_path }}" - - "{{ outline_volume_redis }}" - - "{{ outline_volume_db }}" - - "{{ outline_volume_s3 }}" + - "{{ outline_setup_path | expanduser | realpath }}" + - "{{ outline_volume_redis | expanduser | realpath }}" + - "{{ outline_volume_db | expanduser | realpath }}" + - "{{ outline_volume_s3 | expanduser | realpath }}" tags: - configuration @@ -33,7 +33,7 @@ - name: Write configuration files ansible.builtin.template: src: "{{ item }}.j2" - dest: "{{ outline_setup_path }}/{{ item }}" + dest: "{{ outline_setup_path | expanduser | realpath }}/{{ item }}" mode: '0640' loop: - "docker-compose.yml" @@ -47,6 +47,6 @@ - name: Ensure all requested components are running. community.docker.docker_compose: - project_src: "{{ outline_setup_path }}" + project_src: "{{ outline_setup_path | expanduser | realpath }}" build: false become: false diff --git a/templates/docker-compose.yml.j2 b/templates/docker-compose.yml.j2 index 000f925..bb0113d 100644 --- a/templates/docker-compose.yml.j2 +++ b/templates/docker-compose.yml.j2 @@ -13,7 +13,7 @@ services: networks: - outline volumes: - - {{ outline_volume_redis }}:/data + - {{ outline_volume_redis | expanduser | realpath }}:/data - /etc/timezone:/etc/timezone:ro - /etc/localtime:/etc/localtime:ro @@ -21,7 +21,7 @@ services: postgres: image: docker.io/library/postgres:12-alpine env_file: - - "{{ outline_setup_path }}/env.db.conf" + - "{{ outline_setup_path | expanduser | realpath }}/env.db.conf" restart: unless-stopped healthcheck: test: ["CMD-SHELL", "pg_isready -d $${POSTGRES_DB} -U $${POSTGRES_USER}"] @@ -45,13 +45,13 @@ services: s3: image: lphoward/fake-s3 env_file: - - "{{ outline_setup_path }}/env.s3.conf" + - "{{ outline_setup_path | expanduser | realpath }}/env.s3.conf" {% if outline_fake_s3_port %} ports: - {{ outline_fake_s3_port }}:4569 {% endif %} volumes: - - {{ outline_volume_s3 }}:/fakes3_root + - {{ outline_volume_s3 | expanduser | realpath }}:/fakes3_root networks: - outline {% endif %} @@ -61,8 +61,8 @@ services: command: sh -c "yarn start" # command: sh -c "yarn sequelize:migrate --env production-ssl-disabled && yarn start" env_file: - - "{{ outline_setup_path }}/env.outline.conf" - - "{{ outline_setup_path }}/env.oidc.conf" + - "{{ outline_setup_path | expanduser | realpath }}/env.outline.conf" + - "{{ outline_setup_path | expanduser | realpath }}/env.oidc.conf" restart: always ports: - {{ outline_port }}:3000