mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2025-09-24 11:06:24 +02:00
Refactor docker-compose templates: replace {% include 'build.yml.j2' %} with lookup() + indent for proper YAML embedding. Also adjusted build.yml.j2 to remove leading spaces. See: https://chatgpt.com/share/68ce584a-a430-800f-8e2a-0f96884cc8d1
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
{# integrate it into service sections to be build by Dockerfile #}
|
{# integrate it into service sections to be build by Dockerfile #}
|
||||||
pull_policy: never
|
pull_policy: never
|
||||||
build:
|
build:
|
||||||
context: .
|
context: .
|
||||||
dockerfile: Dockerfile
|
dockerfile: Dockerfile
|
||||||
{# pass Arguments here #}
|
{# pass Arguments here #}
|
@@ -3,7 +3,7 @@
|
|||||||
postgres:
|
postgres:
|
||||||
container_name: "{{ POSTGRES_CONTAINER }}"
|
container_name: "{{ POSTGRES_CONTAINER }}"
|
||||||
image: "{{ POSTGRES_CUSTOM_IMAGE_NAME }}"
|
image: "{{ POSTGRES_CUSTOM_IMAGE_NAME }}"
|
||||||
{% include 'roles/docker-container/templates/build.yml.j2' %}
|
{{ lookup('template', 'roles/docker-container/templates/build.yml.j2') | indent(4) }}
|
||||||
command:
|
command:
|
||||||
- "postgres"
|
- "postgres"
|
||||||
- "-c"
|
- "-c"
|
||||||
|
@@ -9,7 +9,7 @@
|
|||||||
(python manage.py initdb || true) &&
|
(python manage.py initdb || true) &&
|
||||||
python -m gunicorn bookwyrm.wsgi:application --bind 0.0.0.0:{{ container_port }}
|
python -m gunicorn bookwyrm.wsgi:application --bind 0.0.0.0:{{ container_port }}
|
||||||
'
|
'
|
||||||
{% include 'roles/docker-container/templates/build.yml.j2' %}
|
{{ lookup('template', 'roles/docker-container/templates/build.yml.j2') | indent(4) }}
|
||||||
image: "{{ BOOKWYRM_CUSTOM_IMAGE }}"
|
image: "{{ BOOKWYRM_CUSTOM_IMAGE }}"
|
||||||
container_name: "{{ BOOKWYRM_CONTAINER }}"
|
container_name: "{{ BOOKWYRM_CONTAINER }}"
|
||||||
hostname: "{{ BOOKWYRM_HOSTNAME }}"
|
hostname: "{{ BOOKWYRM_HOSTNAME }}"
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
{% include 'roles/docker-compose/templates/base.yml.j2' %}
|
{% include 'roles/docker-compose/templates/base.yml.j2' %}
|
||||||
|
|
||||||
application:
|
application:
|
||||||
{% include 'roles/docker-container/templates/build.yml.j2' %}
|
{{ lookup('template', 'roles/docker-container/templates/build.yml.j2') | indent(4) }}
|
||||||
args:
|
args:
|
||||||
BRIDGY_REPO_URL: "{{ BRIDGY_REPO_URL }}"
|
BRIDGY_REPO_URL: "{{ BRIDGY_REPO_URL }}"
|
||||||
BRIDGY_REPO_BRANCH: "{{ BRIDGY_REPO_BRANCH }}"
|
BRIDGY_REPO_BRANCH: "{{ BRIDGY_REPO_BRANCH }}"
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
{% include 'roles/docker-compose/templates/base.yml.j2' %}
|
{% include 'roles/docker-compose/templates/base.yml.j2' %}
|
||||||
application:
|
application:
|
||||||
{% include 'roles/docker-container/templates/build.yml.j2' %}
|
{{ lookup('template', 'roles/docker-container/templates/build.yml.j2') | indent(4) }}
|
||||||
args:
|
args:
|
||||||
CHESS_VERSION: "{{ CHESS_VERSION }}"
|
CHESS_VERSION: "{{ CHESS_VERSION }}"
|
||||||
CHESS_REPO_URL: "{{ CHESS_REPO_URL }}"
|
CHESS_REPO_URL: "{{ CHESS_REPO_URL }}"
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
{% include 'roles/docker-compose/templates/base.yml.j2' %}
|
{% include 'roles/docker-compose/templates/base.yml.j2' %}
|
||||||
application:
|
application:
|
||||||
{% include 'roles/docker-container/templates/build.yml.j2' %}
|
{{ lookup('template', 'roles/docker-container/templates/build.yml.j2') | indent(4) }}
|
||||||
image: "{{ CONFLUENCE_CUSTOM_IMAGE }}"
|
image: "{{ CONFLUENCE_CUSTOM_IMAGE }}"
|
||||||
container_name: "{{ CONFLUENCE_CONTAINER }}"
|
container_name: "{{ CONFLUENCE_CONTAINER }}"
|
||||||
hostname: '{{ CONFLUENCE_HOSTNAME}}'
|
hostname: '{{ CONFLUENCE_HOSTNAME}}'
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
|
|
||||||
{% include 'roles/docker-compose/templates/base.yml.j2' %}
|
{% include 'roles/docker-compose/templates/base.yml.j2' %}
|
||||||
application:
|
application:
|
||||||
{% include 'roles/docker-container/templates/build.yml.j2' %}
|
{{ lookup('template', 'roles/docker-container/templates/build.yml.j2') | indent(4) }}
|
||||||
image: "{{ JIRA_CUSTOM_IMAGE }}"
|
image: "{{ JIRA_CUSTOM_IMAGE }}"
|
||||||
container_name: "{{ JIRA_CONTAINER }}"
|
container_name: "{{ JIRA_CONTAINER }}"
|
||||||
hostname: '{{ JIRA_HOSTNAME }}'
|
hostname: '{{ JIRA_HOSTNAME }}'
|
||||||
|
@@ -3,7 +3,7 @@
|
|||||||
moodle:
|
moodle:
|
||||||
{% set container_port = 8080 %}
|
{% set container_port = 8080 %}
|
||||||
container_name: {{ moodle_container }}
|
container_name: {{ moodle_container }}
|
||||||
{% include 'roles/docker-container/templates/build.yml.j2' %}
|
{{ lookup('template', 'roles/docker-container/templates/build.yml.j2') | indent(4) }}
|
||||||
image: moodle_custom
|
image: moodle_custom
|
||||||
ports:
|
ports:
|
||||||
- 127.0.0.1:{{ ports.localhost.http[application_id] }}:{{ container_port }}
|
- 127.0.0.1:{{ ports.localhost.http[application_id] }}:{{ container_port }}
|
||||||
|
@@ -3,7 +3,7 @@ x-op-app: &app
|
|||||||
logging:
|
logging:
|
||||||
driver: journald
|
driver: journald
|
||||||
image: {{ openproject_custom_image }}
|
image: {{ openproject_custom_image }}
|
||||||
{% include 'roles/docker-container/templates/build.yml.j2' %}
|
{{ lookup('template', 'roles/docker-container/templates/build.yml.j2') | indent(2) }}
|
||||||
|
|
||||||
{% include 'roles/docker-compose/templates/base.yml.j2' %}
|
{% include 'roles/docker-compose/templates/base.yml.j2' %}
|
||||||
|
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
{% include 'roles/docker-compose/templates/base.yml.j2' %}
|
{% include 'roles/docker-compose/templates/base.yml.j2' %}
|
||||||
application:
|
application:
|
||||||
{% include 'roles/docker-container/templates/build.yml.j2' %}
|
{{ lookup('template', 'roles/docker-container/templates/build.yml.j2') | indent(4) }}
|
||||||
image: "{{ PRETIX_IMAGE_CUSTOM }}"
|
image: "{{ PRETIX_IMAGE_CUSTOM }}"
|
||||||
container_name: "{{ PRETIX_CONTAINER }}"
|
container_name: "{{ PRETIX_CONTAINER }}"
|
||||||
hostname: '{{ PRETIX_HOSTNAME}}'
|
hostname: '{{ PRETIX_HOSTNAME}}'
|
||||||
|
@@ -1,9 +1,9 @@
|
|||||||
{% include 'roles/docker-compose/templates/base.yml.j2' %}
|
{% include 'roles/docker-compose/templates/base.yml.j2' %}
|
||||||
application:
|
application:
|
||||||
container_name: roulette_application
|
container_name: roulette_application
|
||||||
{% include 'roles/docker-container/templates/build.yml.j2' %}
|
{{ lookup('template', 'roles/docker-container/templates/build.yml.j2') | indent(4) }}
|
||||||
ports:
|
ports:
|
||||||
- 127.0.0.1:{{ ports.localhost.http[application_id] }}:8080
|
- 127.0.0.1:{{ ports.localhost.http[application_id] }}:8080
|
||||||
restart: {{ DOCKER_RESTART_POLICY }}
|
restart: {{ DOCKER_RESTART_POLICY }}
|
||||||
|
|
||||||
{% include 'roles/docker-compose/templates/networks.yml.j2' %}
|
{% include 'roles/docker-compose/templates/networks.yml.j2' %}
|
@@ -3,7 +3,7 @@
|
|||||||
{% include 'roles/docker-container/templates/base.yml.j2' %}
|
{% include 'roles/docker-container/templates/base.yml.j2' %}
|
||||||
image: {{ WORDPRESS_CUSTOM_IMAGE }}
|
image: {{ WORDPRESS_CUSTOM_IMAGE }}
|
||||||
container_name: {{ WORDPRESS_CONTAINER }}
|
container_name: {{ WORDPRESS_CONTAINER }}
|
||||||
{% include 'roles/docker-container/templates/build.yml.j2' %}
|
{{ lookup('template', 'roles/docker-container/templates/build.yml.j2') | indent(4) }}
|
||||||
ports:
|
ports:
|
||||||
- "127.0.0.1:{{ ports.localhost.http[application_id] }}:80"
|
- "127.0.0.1:{{ ports.localhost.http[application_id] }}:80"
|
||||||
volumes:
|
volumes:
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
{% include 'roles/docker-compose/templates/base.yml.j2' %}
|
{% include 'roles/docker-compose/templates/base.yml.j2' %}
|
||||||
application:
|
application:
|
||||||
{% include 'roles/docker-container/templates/build.yml.j2' %}
|
{{ lookup('template', 'roles/docker-container/templates/build.yml.j2') | indent(4) }}
|
||||||
image: "{{ XWIKI_IMAGE_CUSTOM }}"
|
image: "{{ XWIKI_IMAGE_CUSTOM }}"
|
||||||
container_name: "{{ XWIKI_CONTAINER }}"
|
container_name: "{{ XWIKI_CONTAINER }}"
|
||||||
hostname: '{{ XWIKI_HOSTNAME}}'
|
hostname: '{{ XWIKI_HOSTNAME}}'
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
{% include 'roles/docker-compose/templates/base.yml.j2' %}
|
{% include 'roles/docker-compose/templates/base.yml.j2' %}
|
||||||
application:
|
application:
|
||||||
{% include 'roles/docker-container/templates/build.yml.j2' %}
|
{{ lookup('template', 'roles/docker-container/templates/build.yml.j2') | indent(4) }}
|
||||||
image: simpleicons-server:latest
|
image: simpleicons-server:latest
|
||||||
container_name: simpleicons-server
|
container_name: simpleicons-server
|
||||||
ports:
|
ports:
|
||||||
|
Reference in New Issue
Block a user