Skip to content

Commit

Permalink
Merge pull request #381 from manala/elao.app.docker/debian-12
Browse files Browse the repository at this point in the history
[Elao - App - Docker] Debian 12
  • Loading branch information
nervo authored Apr 12, 2024
2 parents 64f531b + e84b938 commit 548dee9
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 11 deletions.
2 changes: 1 addition & 1 deletion elao.app.docker/.manala.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ project:

system:
# @option {"label": "System version"}
# @schema {"enum": [11, 10]}
# @schema {"enum": [12, 11, 10]}
version: ~
# @schema {"type": "string", "pattern": "^[a-zA-Z]+/[a-zA-Z]+$"}
timezone: Etc/UTC
Expand Down
8 changes: 6 additions & 2 deletions elao.app.docker/.manala/ansible/system.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,14 @@
manala_apt_components:
- main

manala_apt_sources_list_template: apt/sources.list.j2
manala_apt_sources_list: false

manala_apt_repositories_exclusive: true
manala_apt_repositories: "{{ system_apt_repositories }}"
manala_apt_repositories:
- default
- updates
- security
- "{{ system_apt_repositories }}"

manala_apt_preferences_exclusive: true
manala_apt_preferences:
Expand Down
3 changes: 0 additions & 3 deletions elao.app.docker/.manala/ansible/templates/apt/sources.list.j2

This file was deleted.

11 changes: 8 additions & 3 deletions elao.app.docker/.manala/docker/Dockerfile.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,6 @@ RUN \
/var/cache/apt/archives/libssl1.1.deb ; \
fi \
{{- end }}
# Apt keyrings (debian < bookworm)
&& install --verbose --mode 0755 --directory /etc/apt/keyrings \
# User
&& addgroup --gid ${MANALA_GROUP_ID} app \
&& adduser --home /home/app --shell /bin/bash --uid ${MANALA_USER_ID} --gecos app --ingroup app --disabled-password app \
Expand Down Expand Up @@ -220,11 +218,18 @@ RUN \
&& ldconfig \
&& python3.9 -m pip --no-cache-dir --disable-pip-version-check install \
ansible==${ANSIBLE_VERSION} \
{{- else }}
{{- else if eq (.version|int) 11 }}
# As controller node
python3-pip \
&& pip3 --no-cache-dir --disable-pip-version-check install \
ansible==${ANSIBLE_VERSION} \
{{- else }}
# As controller node
pipx \
&& PIPX_HOME="/usr/local/pipx" PIPX_BIN_DIR="/usr/local/bin" \
pipx install ansible==${ANSIBLE_VERSION} \
--include-deps --pip-args="--no-cache-dir" --verbose \
&& rm -rf ~/.cache/pip /usr/local/pipx/.cache /usr/local/pipx/logs \
{{- end }}
&& install --verbose --mode 0755 --directory /etc/ansible \
&& printf "\
Expand Down
2 changes: 1 addition & 1 deletion elao.app.docker/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ project:
##########

system:
version: 11
version: 12
#timezone: Etc/UTC # Optional
#locales: # Optional
# default: C.UTF-8
Expand Down
2 changes: 1 addition & 1 deletion elao.app.docker/test/.manala.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ project:
ports_prefix: 123

system:
version: 11
version: 12
timezone: Europe/Paris
locales:
default: C.UTF-8
Expand Down
4 changes: 4 additions & 0 deletions elao.app.docker/test/goss.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,11 @@ command:
locale --all-locales:
exit-status: 0
stdout:
{{- if le (.Vars.system.version|int) 11 }}
- {{ .Vars.system.locales.default }}
{{- else }}
- {{ .Vars.system.locales.default | replace "UTF-8" "utf8" }}
{{- end }}
{{- range $code := .Vars.system.locales.codes }}
- {{ $code | replace "UTF-8" "utf8" }}
{{- end }}
Expand Down

0 comments on commit 548dee9

Please sign in to comment.