-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add secrets options to service and composition
- Loading branch information
Showing
6 changed files
with
128 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{ | ||
docker-compose.services.webserver = { pkgs, ... }: { | ||
nixos.useSystemd = true; | ||
nixos.configuration.boot.tmpOnTmpfs = true; | ||
nixos.configuration.services.nginx.enable = true; | ||
|
||
# Please don't do this | ||
nixos.configuration.services.nginx.virtualHosts.localhost.root = "/run/secrets"; | ||
|
||
service.useHostStore = true; | ||
service.ports = [ | ||
"8000:80" # host:container | ||
]; | ||
service.secrets."foo.txt".source = "foo"; | ||
}; | ||
docker-compose.secrets.foo.file = ./foo.key; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# Instead of pinning Nixpkgs, we can opt to use the one in NIX_PATH | ||
import <nixpkgs> {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
qux |