Skip to content

Commit

Permalink
[Elao - App - Docker] Debian 12
Browse files Browse the repository at this point in the history
  • Loading branch information
nervo committed Jun 16, 2023
1 parent f935251 commit 59d8a61
Show file tree
Hide file tree
Showing 8 changed files with 29 additions and 20 deletions.
4 changes: 2 additions & 2 deletions 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 Expand Up @@ -60,7 +60,7 @@ system:
network:
hosts: {}
goss:
# @schema {"enum": [null, "0.3.21"]}
# @schema {"enum": [null, "0.3.23"]}
version: ~
nginx:
# @schema {
Expand Down
2 changes: 1 addition & 1 deletion elao.app.docker/.manala/Makefile.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ MANALA_DOCKER_COMPOSE_ENV += \
MANALA_HOST_OS=$(MANALA_OS) \
MANALA_HOST_DIR=$(abspath $(MANALA_DIR))
MANALA_DOCKER_COMPOSE_FILE += \
$(MANALA_DIR)/.manala/docker/compose/init.sysv.yaml \
$(MANALA_DIR)/.manala/docker/compose/init.systemd.yaml \
$(if $(SYMFONY_IDE), $(MANALA_DIR)/.manala/docker/compose/symfony.yaml)
MANALA_DOCKER_COMPOSE_PROFILE ?= development

Expand Down
14 changes: 6 additions & 8 deletions elao.app.docker/.manala/docker/Dockerfile.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,10 @@ RUN \
/var/cache/apt/archives/libssl1.1.deb ; \
fi \
{{- end }}
# Apt keyrings (debian < bookworm)
{{- if le (.version|int) 11 }}
# Apt keyrings (debian <= bullseye)
&& mkdir --verbose --parents /etc/apt/keyrings \
{{- end }}
# 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 @@ -175,16 +177,12 @@ RUN \
&& rm -rf \
/etc/systemd/system/*.wants/* \
/lib/systemd/system/multi-user.target.wants/* \
/lib/systemd/system/local-fs.target.wants/* \
/lib/systemd/system/sockets.target.wants/*udev* \
/lib/systemd/system/sysinit.target.wants/* \
/lib/systemd/system/sockets.target.wants/*initctl* \
/lib/systemd/system/sysinit.target.wants/systemd-tmpfiles-setup-dev* \
/lib/systemd/system/systemd-update-utmp* \
/lib/systemd/system/timers.target.wants/* \
# Clean
&& rm -rf /var/lib/apt/lists/*

VOLUME /sys/fs/cgroup

STOPSIGNAL SIGRTMIN+3

CMD ["/lib/systemd/systemd"]
Expand All @@ -201,7 +199,7 @@ FROM init-${MANALA_INIT} AS provision-none
# Ansible
FROM init-${MANALA_INIT} AS provision-ansible

ARG ANSIBLE_VERSION="2.14.3"
ARG ANSIBLE_VERSION="2.14.6"
ARG MANALA_PROVISION_LIMIT
ARG SYMFONY_IDE

Expand Down
9 changes: 8 additions & 1 deletion elao.app.docker/.manala/docker/compose/init.systemd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,13 @@ services:
args:
MANALA_INIT: systemd
tty: true
privileged: true
cap_add:
- CAP_SYS_ADMIN
- NET_ADMIN
tmpfs:
- /tmp
- /run
- /run/lock
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:rw
cgroup: host
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ services:
app:
build:
args:
MANALA_PROVISION: ansible
# !!! ansible roles not ready :)
MANALA_PROVISION: none
MANALA_PROVISION_LIMIT: development
ports:
# Usuals (Webpack dev-server, …)
Expand Down
3 changes: 2 additions & 1 deletion elao.app.docker/.manala/docker/mutagen.mk
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
###########

# See: https://www.mail-archive.com/linux-kernel@vger.kernel.org/msg2020882.html
MANALA_MUTAGEN_COMPOSE_BIN = $(shell command -v mutagen-compose 2>/dev/null)
# !!! mutagen compose not ready :)
#MANALA_MUTAGEN_COMPOSE_BIN = $(shell command -v mutagen-compose 2>/dev/null)

MANALA_DOCKER_COMPOSE_BIN = $(if $(MANALA_MUTAGEN_COMPOSE_BIN), \
$(MANALA_MUTAGEN_COMPOSE_BIN), \
Expand Down
10 changes: 6 additions & 4 deletions elao.app.docker/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,17 @@ tableOfContent: 3

MacOS

* Docker Desktop 4.3.2+
* Docker Desktop 4.20.1+
(`brew install docker`)
* Mutagen Compose 0.13.0+
* Mutagen Compose 0.17.1+
(`brew install mutagen-io/mutagen/mutagen-compose`)

Linux

* Docker 20.10.14+
* Docker Engine 24.0.2+
(see [documentation](https://docs.docker.com/engine/install/))
* Docker Compose 2.18.1+
(see [documentation](https://docs.docker.com/compose/install/))

## Overview

Expand Down Expand Up @@ -125,7 +127,7 @@ project:
##########

system:
version: 11
version: 12
#timezone: Etc/UTC # Optional
#locales: # Optional
# default: C.UTF-8
Expand Down
4 changes: 2 additions & 2 deletions 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 All @@ -26,7 +26,7 @@ system:
hosts:
1.2.3.4: foo.bar
goss:
version: 0.3.21
version: 0.3.23
nginx:
configs:
- template: nginx/gzip.j2
Expand Down

0 comments on commit 59d8a61

Please sign in to comment.