diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index c2e0cfe810e962b6f7c41b477f65e4774c63a4b8..9fb5bb6430275a96d87d0af36b3d0e28139daace 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -2,7 +2,7 @@ image: docker:20.10.9 variables: DOCKER_TLS_CERTDIR: "/certs" - IMAGE_VER: 0.12.0 + IMAGE_VER: 0.12.1 services: - docker:20.10.9-dind diff --git a/lib/CF2022.pm b/lib/CF2022.pm index 0925f4735c5813f10c0414bf31425d9eddb8c54b..8c76ef8a280b06e68aef7779c0aba653c196269c 100644 --- a/lib/CF2022.pm +++ b/lib/CF2022.pm @@ -2,12 +2,19 @@ package CF2022; use Mojo::Base 'Mojolicious'; use Mojo::Pg; use Mojo::Redis; +use File::Find; +use Path::Tiny qw( path ); use CF2022::Schema; +use constant SECRETS => '/run/secrets'; + # This method will run once at server start sub startup { my $self = shift; + # env z docker secrets + find(sub { $ENV{$_} = path(SECRETS . "/$_")->slurp if -f $_ }, SECRETS); + my $cfg = $self->plugin('Config' => { file => 'cf2022.conf'} ); $self->helper( cfg => sub { return $cfg; } ); diff --git a/sql/2/up.sql b/sql/2/up.sql index 09a9a06ff8eb9969ce430e3cc39e0e3c2910a738..b94e747a149f1fa28fa98d2285c2ef03518aa3f9 100644 --- a/sql/2/up.sql +++ b/sql/2/up.sql @@ -1,4 +1,2 @@ -create sequence "uid_seq" start 100000; - -alter table order "orders" add column "response" text; -alter table order "orders" add column "paid" timestamp(0); +alter table "orders" add column "response" text; +alter table "orders" add column "paid" timestamp(0);