mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2025-08-30 07:18:09 +02:00
Refactor docker-compose build logic and pull policy
- Added conditional '--pull' flag on retry in docker-compose build handler, tied to MODE_UPDATE - Added 'pull_policy: never' to multiple docker-compose service templates to prevent unwanted image pulls - Fixed minor formatting issues (e.g. Nextcloud volume spacing, WordPress desktop alignment) Reference: https://chatgpt.com/share/68b0207a-4d9c-800f-b76f-9515885e5183
This commit is contained in:
@@ -41,7 +41,7 @@
|
|||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
docker compose build || {
|
docker compose build || {
|
||||||
echo "Retrying without cache and pulling bases...";
|
echo "Retrying without cache and pulling bases...";
|
||||||
docker compose build --no-cache --pull;
|
docker compose build --no-cache{{ ' --pull' if MODE_UPDATE | bool else ''}};
|
||||||
}
|
}
|
||||||
args:
|
args:
|
||||||
chdir: "{{ docker_compose.directories.instance }}"
|
chdir: "{{ docker_compose.directories.instance }}"
|
||||||
|
@@ -6,6 +6,7 @@
|
|||||||
build:
|
build:
|
||||||
context: .
|
context: .
|
||||||
dockerfile: Dockerfile
|
dockerfile: Dockerfile
|
||||||
|
pull_policy: never
|
||||||
{% include 'roles/docker-container/templates/base.yml.j2' %}
|
{% include 'roles/docker-container/templates/base.yml.j2' %}
|
||||||
{% if POSTGRES_EXPOSE_LOCAL %}
|
{% if POSTGRES_EXPOSE_LOCAL %}
|
||||||
ports:
|
ports:
|
||||||
|
@@ -8,6 +8,7 @@
|
|||||||
build:
|
build:
|
||||||
context: {{ docker_repository_path }}
|
context: {{ docker_repository_path }}
|
||||||
dockerfile: Dockerfile
|
dockerfile: Dockerfile
|
||||||
|
pull_policy: never
|
||||||
ports:
|
ports:
|
||||||
- 127.0.0.1:{{ ports.localhost.http[application_id] }}:{{ container_port }}
|
- 127.0.0.1:{{ ports.localhost.http[application_id] }}:{{ container_port }}
|
||||||
volumes:
|
volumes:
|
||||||
|
@@ -26,6 +26,7 @@
|
|||||||
REACT_APP_API_URL: "{{ WEB_PROTOCOL }}://{{domains[application_id].api}}" # API-URL des PDS
|
REACT_APP_API_URL: "{{ WEB_PROTOCOL }}://{{domains[application_id].api}}" # API-URL des PDS
|
||||||
REACT_APP_SITE_NAME: "{{ PRIMARY_DOMAIN | upper }} - Bluesky"
|
REACT_APP_SITE_NAME: "{{ PRIMARY_DOMAIN | upper }} - Bluesky"
|
||||||
REACT_APP_SITE_DESCRIPTION: "Decentral Social "
|
REACT_APP_SITE_DESCRIPTION: "Decentral Social "
|
||||||
|
pull_policy: never
|
||||||
ports:
|
ports:
|
||||||
- "127.0.0.1:{{ports.localhost.http['web-app-bluesky_web']}}:8100"
|
- "127.0.0.1:{{ports.localhost.http['web-app-bluesky_web']}}:8100"
|
||||||
healthcheck:
|
healthcheck:
|
||||||
|
@@ -4,6 +4,7 @@
|
|||||||
build:
|
build:
|
||||||
context: {{ docker_repository_path }}
|
context: {{ docker_repository_path }}
|
||||||
dockerfile: Dockerfile
|
dockerfile: Dockerfile
|
||||||
|
pull_policy: never
|
||||||
image: {{ DESKTOP_IMAGE }}
|
image: {{ DESKTOP_IMAGE }}
|
||||||
container_name: {{ DESKTOP_CONTAINER }}
|
container_name: {{ DESKTOP_CONTAINER }}
|
||||||
ports:
|
ports:
|
||||||
|
@@ -4,6 +4,7 @@
|
|||||||
context: elasticsearch/
|
context: elasticsearch/
|
||||||
args:
|
args:
|
||||||
ELK_VERSION: $ELK_VERSION
|
ELK_VERSION: $ELK_VERSION
|
||||||
|
pull_policy: never
|
||||||
volumes:
|
volumes:
|
||||||
- type: bind
|
- type: bind
|
||||||
source: ./elasticsearch/config/elasticsearch.yml
|
source: ./elasticsearch/config/elasticsearch.yml
|
||||||
@@ -27,6 +28,7 @@
|
|||||||
context: logstash/
|
context: logstash/
|
||||||
args:
|
args:
|
||||||
ELK_VERSION: $ELK_VERSION
|
ELK_VERSION: $ELK_VERSION
|
||||||
|
pull_policy: never
|
||||||
volumes:
|
volumes:
|
||||||
- type: bind
|
- type: bind
|
||||||
source: ./logstash/config/logstash.yml
|
source: ./logstash/config/logstash.yml
|
||||||
@@ -51,6 +53,7 @@
|
|||||||
context: kibana/
|
context: kibana/
|
||||||
args:
|
args:
|
||||||
ELK_VERSION: $ELK_VERSION
|
ELK_VERSION: $ELK_VERSION
|
||||||
|
pull_policy: never
|
||||||
volumes:
|
volumes:
|
||||||
- type: bind
|
- type: bind
|
||||||
source: ./kibana/config/kibana.yml
|
source: ./kibana/config/kibana.yml
|
||||||
|
@@ -10,6 +10,7 @@
|
|||||||
build:
|
build:
|
||||||
context: "{{ docker_repository_path }}"
|
context: "{{ docker_repository_path }}"
|
||||||
dockerfile: Dockerfile
|
dockerfile: Dockerfile
|
||||||
|
pull_policy: never
|
||||||
volumes:
|
volumes:
|
||||||
- "{{ mig_roles_meta_volume }}:/usr/share/nginx/html/roles:ro"
|
- "{{ mig_roles_meta_volume }}:/usr/share/nginx/html/roles:ro"
|
||||||
- "{{ docker_repository_path }}:/usr/share/nginx/html"
|
- "{{ docker_repository_path }}:/usr/share/nginx/html"
|
||||||
|
@@ -6,6 +6,7 @@
|
|||||||
build:
|
build:
|
||||||
context: .
|
context: .
|
||||||
dockerfile: Dockerfile
|
dockerfile: Dockerfile
|
||||||
|
pull_policy: never
|
||||||
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,6 +3,7 @@
|
|||||||
build:
|
build:
|
||||||
context: {{ path_infinito_presentation_output.stdout }}
|
context: {{ path_infinito_presentation_output.stdout }}
|
||||||
dockerfile: {{ path_infinito_presentation_output.stdout }}/Dockerfile
|
dockerfile: {{ path_infinito_presentation_output.stdout }}/Dockerfile
|
||||||
|
pull_policy: never
|
||||||
ports:
|
ports:
|
||||||
- "127.0.0.1:{{ ports.localhost.http[application_id] }}:5000"
|
- "127.0.0.1:{{ ports.localhost.http[application_id] }}:5000"
|
||||||
volumes:
|
volumes:
|
||||||
|
@@ -5,7 +5,7 @@
|
|||||||
container_name: {{ NEXTCLOUD_CONTAINER }}
|
container_name: {{ NEXTCLOUD_CONTAINER }}
|
||||||
volumes:
|
volumes:
|
||||||
- data:{{ NEXTCLOUD_DOCKER_WORK_DIRECTORY }}
|
- data:{{ NEXTCLOUD_DOCKER_WORK_DIRECTORY }}
|
||||||
- {{nextcloud_host_config_additives_directory}}:{{nextcloud_docker_config_additives_directory}}:ro
|
- {{ nextcloud_host_config_additives_directory }}:{{ nextcloud_docker_config_additives_directory }}:ro
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: ["CMD", "su", "www-data", "-s", "/bin/sh", "-c", "php {{ NEXTCLOUD_DOCKER_WORK_DIRECTORY }}occ status"]
|
test: ["CMD", "su", "www-data", "-s", "/bin/sh", "-c", "php {{ NEXTCLOUD_DOCKER_WORK_DIRECTORY }}occ status"]
|
||||||
interval: 1m
|
interval: 1m
|
||||||
|
@@ -6,6 +6,7 @@ x-op-app: &app
|
|||||||
build:
|
build:
|
||||||
context: .
|
context: .
|
||||||
dockerfile: Dockerfile
|
dockerfile: Dockerfile
|
||||||
|
pull_policy: never
|
||||||
|
|
||||||
{% include 'roles/docker-compose/templates/base.yml.j2' %}
|
{% include 'roles/docker-compose/templates/base.yml.j2' %}
|
||||||
|
|
||||||
|
@@ -3,6 +3,7 @@
|
|||||||
container_name: roulette_application
|
container_name: roulette_application
|
||||||
build:
|
build:
|
||||||
context: .
|
context: .
|
||||||
|
pull_policy: never
|
||||||
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 }}
|
||||||
|
@@ -4,6 +4,7 @@
|
|||||||
build:
|
build:
|
||||||
context: {{ path_infinito_sphinx_output.stdout }}
|
context: {{ path_infinito_sphinx_output.stdout }}
|
||||||
dockerfile: {{ path_infinito_sphinx_output.stdout }}/Dockerfile
|
dockerfile: {{ path_infinito_sphinx_output.stdout }}/Dockerfile
|
||||||
|
pull_policy: never
|
||||||
ports:
|
ports:
|
||||||
- "127.0.0.1:{{ ports.localhost.http[application_id] }}:{{ container_port }}"
|
- "127.0.0.1:{{ ports.localhost.http[application_id] }}:{{ container_port }}"
|
||||||
{% include 'roles/docker-container/templates/healthcheck/curl.yml.j2' %}
|
{% include 'roles/docker-container/templates/healthcheck/curl.yml.j2' %}
|
||||||
|
@@ -10,7 +10,7 @@ plugins:
|
|||||||
features:
|
features:
|
||||||
matomo: true
|
matomo: true
|
||||||
css: false
|
css: false
|
||||||
desktop: true
|
desktop: true
|
||||||
oidc: true
|
oidc: true
|
||||||
central_database: true
|
central_database: true
|
||||||
logout: true
|
logout: true
|
||||||
|
@@ -5,6 +5,7 @@
|
|||||||
container_name: {{ WORDPRESS_CONTAINER }}
|
container_name: {{ WORDPRESS_CONTAINER }}
|
||||||
build:
|
build:
|
||||||
context: .
|
context: .
|
||||||
|
pull_policy: never
|
||||||
ports:
|
ports:
|
||||||
- "127.0.0.1:{{ ports.localhost.http[application_id] }}:80"
|
- "127.0.0.1:{{ ports.localhost.http[application_id] }}:80"
|
||||||
volumes:
|
volumes:
|
||||||
|
@@ -4,6 +4,7 @@
|
|||||||
build:
|
build:
|
||||||
context: {{ docker_repository_path }}
|
context: {{ docker_repository_path }}
|
||||||
dockerfile: Dockerfile
|
dockerfile: Dockerfile
|
||||||
|
pull_policy: never
|
||||||
image: logout
|
image: logout
|
||||||
container_name: logout
|
container_name: logout
|
||||||
ports:
|
ports:
|
||||||
|
@@ -3,6 +3,7 @@
|
|||||||
build:
|
build:
|
||||||
context: .
|
context: .
|
||||||
dockerfile: Dockerfile
|
dockerfile: Dockerfile
|
||||||
|
pull_policy: never
|
||||||
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