diff --git a/roles/docker-sphinx/tasks/main.yml b/roles/docker-sphinx/tasks/main.yml index 41f8d419..e2f7886e 100644 --- a/roles/docker-sphinx/tasks/main.yml +++ b/roles/docker-sphinx/tasks/main.yml @@ -18,10 +18,6 @@ command: pkgmgr path cymais-sphinx register: path_cymais_sphinx_output -- name: Get path of cymais using pkgmgr - command: pkgmgr path cymais - register: path_cymais_output - - name: "include role nginx-domain-setup for {{application_id}}" include_role: name: nginx-domain-setup @@ -29,29 +25,5 @@ domain: "{{ domains[application_id] }}" http_port: "{{ ports.localhost.http[application_id] }}" -- name: "Link {{ path_cymais_sphinx_output.stdout }} to {{ host_sphinx_exec_dir_absolute }}" - file: - src: "{{ path_cymais_sphinx_output.stdout }}" - dest: "{{ host_sphinx_exec_dir_absolute }}" - state: link - force: yes - notify: docker compose project build and setup - -- name: "Link {{ path_cymais_sphinx_output.stdout }}/Dockerfile to {{ sphinx_host_dockerfile }}" - file: - src: "{{ path_cymais_sphinx_output.stdout }}/Dockerfile" - dest: "{{ sphinx_host_dockerfile }}" - state: link - force: yes - notify: docker compose project build and setup - -- name: "Link {{ path_cymais_output.stdout }} to {{ host_sphinx_source_dir_absolute }}" - file: - src: "{{ path_cymais_output.stdout }}" - dest: "{{ host_sphinx_source_dir_absolute }}" - state: link - force: yes - notify: docker compose project build and setup - - name: "copy docker-compose.yml and env file" include_tasks: copy-docker-compose-and-env.yml \ No newline at end of file diff --git a/roles/docker-sphinx/templates/docker-compose.yml.j2 b/roles/docker-sphinx/templates/docker-compose.yml.j2 index 533b0ff3..f87613b1 100644 --- a/roles/docker-sphinx/templates/docker-compose.yml.j2 +++ b/roles/docker-sphinx/templates/docker-compose.yml.j2 @@ -1,11 +1,8 @@ services: application: build: - context: . - dockerfile: Dockerfile - args: - SPHINX_HOST_SOURCE_DIR_RELATIVE: {{host_sphinx_source_dir_relative}}/ - SPHINX_HOST_EXEC_DIR_RELATIVE: {{host_sphinx_exec_dir_relative}}/ + context: {{ path_cymais_sphinx_output.stdout }} + dockerfile: {{ path_cymais_sphinx_output.stdout }}/Dockerfile ports: - "127.0.0.1:{{ports.localhost.http[application_id]}}:8000" healthcheck: diff --git a/roles/docker-sphinx/vars/main.yml b/roles/docker-sphinx/vars/main.yml index 8efbbfb8..7151792a 100644 --- a/roles/docker-sphinx/vars/main.yml +++ b/roles/docker-sphinx/vars/main.yml @@ -1,9 +1 @@ -application_id: "sphinx" - -host_sphinx_source_dir_relative: "services/cymais" # Place where the sphinx source repository is stored on the host -host_sphinx_source_dir_absolute: "{{docker_compose.directories.instance}}{{host_sphinx_source_dir_relative}}" # Place where the sphinx source repository is stored on the host - -host_sphinx_exec_dir_relative: "services/cymais-sphinx" # Place where the sphinx source repository is stored on the host -host_sphinx_exec_dir_absolute: "{{docker_compose.directories.instance}}{{host_sphinx_source_dir_relative}}" # Place where the sphinx source repository is stored on the host - -sphinx_host_dockerfile: "{{ docker_compose.directories.instance }}Dockerfile" # Path to the Dockerfile to build sphinx on the server \ No newline at end of file +application_id: "sphinx" \ No newline at end of file