Rename docker-compose.yml to compose.yaml and service.env to .env

This commit is contained in:
Tobias Reisinger 2025-06-17 19:14:28 +02:00
parent 7821b6b33b
commit 214723546a
Signed by: serguzim
GPG key ID: 13AD60C237A28DFE
20 changed files with 36 additions and 36 deletions
inventory/group_vars/all
playbooks
roles
authentik/vars
forgejo/tasks
forgejo_runner/tasks
healthcheck
immich/vars
jitsi/vars
lego
files
tasks
synapse/vars
tandoor/vars
tinytinyrss/vars
woodpecker/vars
tasks
templates

View file

@ -12,7 +12,7 @@ compose_file_env:
services:
app:
env_file:
- service.env
- .env
compose_file_networks:
services:

View file

@ -49,7 +49,7 @@ authentik_compose:
- /var/run/docker.sock:/var/run/docker.sock
- ./certs:/certs
env_file:
- service.env
- .env
depends_on:
- redis
networks:

View file

@ -13,7 +13,7 @@
- name: Create the app.ini file
ansible.builtin.copy:
dest: "{{ (service_path, 'app.ini') | path_join }}"
content: '{{ forgejo_ini | to_ini }}'
content: '{{ forgejo_ini | community.general.to_ini }}'
mode: "0644"
notify: Restart service {{ role_name }}

View file

@ -9,8 +9,8 @@
block:
- name: Import tasks to create service directory
ansible.builtin.import_tasks: tasks/steps/create-service-directory.yml
- name: Import tasks to template docker compose file
ansible.builtin.import_tasks: tasks/steps/template-docker-compose.yml
- name: Import tasks to template compose file
ansible.builtin.import_tasks: tasks/steps/template-compose.yml
- name: Copy the config
ansible.builtin.copy:
@ -18,16 +18,16 @@
dest: "{{ (service_path, 'config.yml') | path_join }}"
mode: "0755"
- name: Check if service.env already exists
- name: Check if .env already exists
ansible.builtin.stat:
path: "{{ (service_path, 'service.env') | path_join }}"
path: "{{ (service_path, '.env') | path_join }}"
register: env_file
- name: Import tasks to prompt for the registration token
ansible.builtin.import_tasks: tasks/prompt-registration-token.yml
when: not env_file.stat.exists or force_forgejo_runner_registration | default(False)
- name: Import tasks create a service.env file
- name: Import tasks create a .env file
ansible.builtin.import_tasks: tasks/steps/template-service-env.yml
- name: Import start tasks for common service
ansible.builtin.import_tasks: tasks/start-common-service.yml

View file

@ -1,8 +1,8 @@
---
- name: Template the docker-compose file
- name: Template the compose file
ansible.builtin.template:
src: docker-compose.yml.j2
dest: "{{ (service_path, 'docker-compose.yml') | path_join }}"
src: compose.yaml.j2
dest: "{{ (service_path, 'compose.yaml') | path_join }}"
mode: "0644"
- name: Copy the Dockerfile
ansible.builtin.copy:

View file

@ -15,7 +15,7 @@
- name: Import tasks specific to systemd
ansible.builtin.import_tasks: systemd.yml
- name: Import tasks create a service.env file
- name: Import tasks create a .env file
ansible.builtin.import_tasks: tasks/steps/template-service-env.yml
- name: Build service

View file

@ -5,7 +5,7 @@ x-common-elements:
image: "{{ (container_registry.public, 'services/healthcheck') | path_join }}"
restart: never
env_file:
- service.env
- .env
volumes:
- ./data/:/opt
network_mode: host

View file

@ -51,7 +51,7 @@ immich_compose:
volumes:
- model-cache:/cache
env_file:
- service.env
- .env
restart: always
networks:
default:
@ -67,7 +67,7 @@ immich_compose:
labels:
net.serguzim.logs.collect: true
env_file:
- service.env
- .env
volumes:
- pgdata:/var/lib/postgresql/data
restart: always

View file

@ -33,7 +33,7 @@ jitsi_compose:
image: "jitsi/prosody:{{ jitsi_image_version }}"
restart: always
env_file:
- service.env
- .env
expose:
- '5222'
- '5269'
@ -48,7 +48,7 @@ jitsi_compose:
image: "jitsi/jicofo:{{ jitsi_image_version }}"
restart: always
env_file:
- service.env
- .env
ports:
- '127.0.0.1:8888:8888'
labels:
@ -62,7 +62,7 @@ jitsi_compose:
image: "jitsi/jvb:{{ jitsi_image_version }}"
restart: always
env_file:
- service.env
- .env
ports:
- '127.0.0.1:8080:8080'
- '10000:10000/udp'

View file

@ -1,7 +1,7 @@
#!/usr/bin/env sh
set -a
. ./service.env
. ./.env
set +a
domain="$1"

View file

@ -29,7 +29,7 @@
dest: "{{ (service_path, 'lego.sh') | path_join }}"
mode: "0755"
- name: Import tasks create a service.env file
- name: Import tasks create a .env file
ansible.builtin.import_tasks: tasks/steps/template-service-env.yml
- name: Run certificate-script for domains

View file

@ -111,7 +111,7 @@ synapse_compose:
labels:
com.centurylinklabs.watchtower.enable: true
env_file:
- service.env
- .env
networks:
apps:
aliases:

View file

@ -49,7 +49,7 @@ tandoor_compose:
labels:
com.centurylinklabs.watchtower.enable: true
env_file:
- service.env
- .env
volumes:
- staticfiles:/opt/recipes/staticfiles
- nginx_config:/opt/recipes/nginx/conf.d

View file

@ -38,7 +38,7 @@ tinytinyrss_compose:
image: cthulhoo/ttrss-fpm-pgsql-static
restart: always
env_file:
- service.env
- .env
volumes:
- app:/var/www/html
networks:
@ -47,7 +47,7 @@ tinytinyrss_compose:
image: cthulhoo/ttrss-fpm-pgsql-static
restart: always
env_file:
- service.env
- .env
volumes:
- app:/var/www/html
depends_on:

View file

@ -43,7 +43,7 @@ woodpecker_compose:
com.centurylinklabs.watchtower.enable: true
command: agent
env_file:
- service.env
- .env
depends_on:
- app
volumes:

View file

@ -2,11 +2,11 @@
- name: Import tasks to create service directory
ansible.builtin.import_tasks: tasks/steps/create-service-directory.yml
- name: Import tasks to template docker compose file
ansible.builtin.import_tasks: tasks/steps/template-docker-compose.yml
- name: Import tasks to template compose file
ansible.builtin.import_tasks: tasks/steps/template-compose.yml
when: compose is defined
- name: Import tasks to create a service.env file
- name: Import tasks to create a .env file
ansible.builtin.import_tasks: tasks/steps/template-service-env.yml
when: env is defined

View file

@ -0,0 +1,6 @@
---
- name: Template compose
ansible.builtin.template:
src: compose.yaml.j2
dest: "{{ (service_path, 'compose.yaml') | path_join }}"
mode: "0644"

View file

@ -1,6 +0,0 @@
---
- name: Template docker-compose
ansible.builtin.template:
src: docker-compose.yml.j2
dest: "{{ (service_path, 'docker-compose.yml') | path_join }}"
mode: "0644"

View file

@ -1,6 +1,6 @@
---
- name: Template service.env file
- name: Template .env file
ansible.builtin.template:
src: env.j2
dest: "{{ (service_path, 'service.env') | path_join }}"
dest: "{{ (service_path, '.env') | path_join }}"
mode: "0700"