Skip to content
Snippets Groups Projects
Verified Commit 6e35888d authored by Andrej Ramašeuski's avatar Andrej Ramašeuski
Browse files

Nacteni citlivych dat z docker secrets

parent 0f69403c
No related branches found
No related tags found
No related merge requests found
Pipeline #11398 passed
2.4.1
2.5.0
......@@ -5,8 +5,12 @@ use Mojo::Pg;
use Mojo::Redis;
use Mojolicious::Plugin::Authentication;
use Net::OAuth2::Profile::WebServer;
use File::Find;
use Path::Tiny qw( path );
use PZ::Schema;
use constant SECRETS => '/run/secrets';
sub startup {
my $self = shift;
......@@ -14,6 +18,9 @@ sub startup {
my $cfg = $self->plugin('Config');
$self->helper( cfg => sub { return $cfg; } );
# konfigurace z docker secrets (maji prednost!)
find(sub { $cfg->{$_} = path(SECRETS . "/$_")->slurp_utf8 }, SECRETS);
# Podpis pro cookies
$self->secrets($cfg->{session}{secrets});
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment