Add wallabag docker container

This commit is contained in:
coolneng 2020-01-26 19:39:28 +01:00
parent 375758a958
commit 5eb5e446ad
Signed by: coolneng
GPG Key ID: 9893DA236405AF57
2 changed files with 30 additions and 3 deletions

View File

@ -92,9 +92,6 @@
programs.fish.enable = true; programs.fish.enable = true;
users.users.root.shell = "/run/current-system/sw/bin/fish"; users.users.root.shell = "/run/current-system/sw/bin/fish";
# Start a tmux session
#programs.tmux.enable = true;
# Import other configuration modules # Import other configuration modules
imports = [ imports = [
./modules/printing.nix ./modules/printing.nix
@ -103,6 +100,7 @@
./modules/hardware-configuration.nix ./modules/hardware-configuration.nix
./modules/webstack.nix ./modules/webstack.nix
./modules/devops.nix ./modules/devops.nix
./modules/containers.nix
]; ];
} }

29
modules/containers.nix Normal file
View File

@ -0,0 +1,29 @@
{ config, lib, pkgs, ... }:
let password = builtins.readFile /var/lib/wallabag/token;
in
{
# Enable Docker
virtualisation.docker = {
enable = true;
storageDriver = "overlay2";
};
# Container setup
docker-containers = {
wallabag = {
image = "decentralize/wallabag";
environment = {
SYMFONY__ENV__DATABASE_DRIVER = "pdo_pgsql";
SYMFONY__ENV__DATABASE_NAME = "wallabag";
SYMFONY__ENV__DATABASE_USER = "wallabag";
SYMFONY__ENV__DATABASE_PASSWORD = password;
SYMFONY__ENV__FOSUSER_REGISTRATION= "false";
SYMFONY__ENV__DOMAIN_NAME= "https://coolneng.duckdns.org/wallabag";
POPULATE_DATABASE = "false";
};
ports = [ "80:8081" ];
};
};
}