Mailcow: Force build, move build directives into docker-compose override file.
diff --git a/images.nix b/images.nix
index 186dcf1..3098ce2 100644
--- a/images.nix
+++ b/images.nix
@@ -56,6 +56,8 @@
let
dockerComposeOverrideYaml =
pkgs.writeTextDir "docker-compose.override.yml" ''
+ version: '2.1'
+
services:
mysql-mailcow:
image: alpine/socat:1.0.3
@@ -66,6 +68,12 @@
- mysql-socket-vol-1:/var/run/mysqld/:Z
restart: always
+ netfilter-mailcow:
+ build: ./data/Dockerfiles/netfilter
+
+ watchdog-mailcow:
+ build: ./data/Dockerfiles/watchdog
+
volumes:
vmail-vol-1: {driver: local, driver_opts: {o: bind, type: none, device: "/vol/vmail"}}
vmail-index-vol-1: {driver: local, driver_opts: {o: bind, type: none, device: "/vol/vmail-index"}}
@@ -98,6 +106,8 @@
${pkgs.docker}/bin/docker kill $(${pkgs.docker}/bin/docker ps -a -q) || :
${pkgs.docker}/bin/docker system prune --volumes --force || :
+ ${pkgs.docker-compose}/bin/docker-compose -f /mailcow-dockerized/docker-compose.yml -f ${dockerComposeOverrideYaml}/docker-compose.override.yml build
+
${pkgs.busybox}/bin/mkdir -p /tmp /run/{mysql,mysql-socket}
exec ${pkgs.docker-compose}/bin/docker-compose --env-file /mailcow-dockerized/mailcow.conf -f /mailcow-dockerized/docker-compose.yml -f ${dockerComposeOverrideYaml}/docker-compose.override.yml up --remove-orphans
'';
diff --git a/mailcow/src/mailcow-dockerized/docker-compose.yml b/mailcow/src/mailcow-dockerized/docker-compose.yml
index 40b2617..5362bfc 100644
--- a/mailcow/src/mailcow-dockerized/docker-compose.yml
+++ b/mailcow/src/mailcow-dockerized/docker-compose.yml
@@ -382,7 +382,7 @@
- acme
netfilter-mailcow:
- build: ./data/Dockerfiles/netfilter
+ image: mailcow/netfilter:1.38
stop_grace_period: 30s
depends_on:
- dovecot-mailcow
@@ -405,7 +405,9 @@
- /lib/modules:/lib/modules:ro
watchdog-mailcow:
- build: ./data/Dockerfiles/watchdog
+ image: mailcow/watchdog:1.86
+ # Debug
+ #command: /watchdog.sh
dns:
- ${IPV4_NETWORK:-172.22.1}.254
volumes: